Skip to content

Commit

Permalink
Temporary work around nullptr seqno_to_time_mapping in FlushJob
Browse files Browse the repository at this point in the history
Summary: To resolve a crash test failure in
`FlushJob::GetPrecludeLastLevelMinSeqno()`

To fix this properly, I will work on ensuring that (a) FlushJob is
created with a consistent view on mutable options and
seqno_to_time_mapping (from a single SuperVersion) and (b) SuperVersions
always have a non-null seqno_to_time_mapping when a relevant option is
set.

Test Plan: watch crash test
  • Loading branch information
pdillinger committed Jan 6, 2025
1 parent 631b679 commit 59fb2cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion db/flush_job.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,11 @@ void FlushJob::GetEffectiveCutoffUDTForPickedMemTables() {
}

void FlushJob::GetPrecludeLastLevelMinSeqno() {
if (mutable_cf_options_.preclude_last_level_data_seconds == 0) {
if (mutable_cf_options_.preclude_last_level_data_seconds == 0 ||
// FIXME: create FlushJob and build SuperVersions such that
// preclude_last_level_data_seconds > 0 implies
// seqno_to_time_mapping_ != nullptr
seqno_to_time_mapping_ == nullptr) {
return;
}
int64_t current_time = 0;
Expand Down

0 comments on commit 59fb2cd

Please sign in to comment.