Skip to content

Commit

Permalink
Fix unhandled MANIFEST write errors
Browse files Browse the repository at this point in the history
Summary:
The failure of WriteCurrentStateToManifest() was not handled properly.
If it failed, manifest_io_status was not updated, leading to
manifest_file_number_ being updated to the newly created manifest even
though its bad.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
  • Loading branch information
anand1976 committed Jul 15, 2024
1 parent 0e3e43f commit dc63486
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion db/version_set.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5564,7 +5564,9 @@ Status VersionSet::ProcessManifestWrites(
s = WriteCurrentStateToManifest(write_options, curr_state,
wal_additions, descriptor_log_.get(),
io_s);
} else {
assert(s == io_s);
}
if (!io_s.ok()) {
manifest_io_status = io_s;
s = io_s;
}
Expand Down

0 comments on commit dc63486

Please sign in to comment.