Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sys-4815] treat inconsistent epoch number as poison instead of corruption #284

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions db/db_impl/db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1448,12 +1448,13 @@ Status DBImpl::ApplyReplicationLogRecord(ReplicationLogRecord record,
cfd->SetNextEpochNumber(newFiles.begin()->second.epoch_number);
}

// do consistency check by comparing the replicated epoch number against
// inferred epoch number
// do consistency check by comparing the replicated epoch number
// against inferred epoch number No need to
// `reset_next_epoch_number` here since we have already done it
s = InferEpochNumber(&e, cfd, info,
false /* reset_next_epoch_number */);
if (s.ok() && info->mismatched_epoch_num > 0) {
s = Status::Corruption("epoch number consistency check fails");
s = Status::Poison("epoch number consistency check fails");
}
if (!s.ok()) {
break;
Expand Down
Loading