feat: Add FlushPicker to flush regions periodically (#1559)

* feat: Add FlushPicker

* feat(storage): Add close to StorageEngine

* style(storage): fix clippy

* feat(storage): Close regions in StorageEngine::close

* chore(storage): Clear requests on scheduler stop

* test(storage): Test flush picker

* feat(storage): Add metrics for auto flush

* feat(storage): Add flush reason and record it in metrics

* feat: Expose flush config

docs(config): Update config example

* refactor(storage): Run auto flush task in FlushScheduler

* refactor(storage): Add FlushItem trait to make FlushPicker easy to test
This commit is contained in:
Yingwen
2023-05-15 17:29:28 +08:00
committed by GitHub
parent 497b1f9dc9
commit 8d54d40b21
32 changed files with 606 additions and 66 deletions

View File

@@ -160,7 +160,8 @@ mod tests {
Arc::new(log_store),
object_store.clone(),
compaction_scheduler,
),
)
.unwrap(),
object_store,
));
let engine_manager = Arc::new(MemoryTableEngineManager::new(mock_engine.clone()));