-
Notifications
You must be signed in to change notification settings - Fork 166
fix(db): avoid long flush stall on restart #211
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
base: new-index
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -283,9 +283,14 @@ impl Indexer { | |
| fn start_auto_compactions(&self, db: &DB) { | ||
| let key = b"F".to_vec(); | ||
| if db.get(&key).is_none() { | ||
| info!("full-compaction sentinel 'F' not found — running one-time full compaction and tightening triggers"); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. split this log message across the two following statements, as they are separate... full compaction happens then the triggers are tightening. there may be a significant time between them. |
||
| db.full_compaction(); | ||
|
EddieHouston marked this conversation as resolved.
|
||
| db.apply_steady_state_triggers(); | ||
| db.put_sync(&key, b""); | ||
| assert!(db.get(&key).is_some()); | ||
| info!("full-compaction sentinel 'F' set — future restarts will skip full compaction"); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the log message should just say 'full compaction sentinel F set'. whether full compaction happens or not is outside the scope of this block |
||
| } else { | ||
| info!("full-compaction sentinel 'F' found — skipping full compaction"); | ||
| } | ||
| db.enable_auto_compaction(); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we've replaced the L0_BULK_TRIGGER with magic numbers, losing some context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updating