Skip to content

Commit

Permalink
Compaction pending bytes: Treat stop as delay
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuval-Ariel committed Feb 21, 2024
1 parent 90ecd82 commit b3e0ab4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion db/column_family.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,12 @@ WriteStallCondition ColumnFamilyData::RecalculateWriteStallConditions(
"Auto tune: Started timer. time: %" PRIu64 " Num L0 files: %d",
l0_start_clearance_time_, vstorage->l0_delay_trigger_count());
}

// TODO: treat stop pending bytes as delay until we have a better
// way of handling it.
if (write_stall_condition == WriteStallCondition::kStopped &&
write_stall_cause == WriteStallCause::kPendingCompactionBytes) {
write_stall_condition = WriteStallCondition::kDelayed;
}
// GetWriteStallConditionAndCause returns the first condition met, so its
// possible that a later condition will require a harder rate limiting.
// calculate all conditions with DynamicSetupDelay and reevaluate the
Expand Down

0 comments on commit b3e0ab4

Please sign in to comment.