Add experimental API WaitForFlushAndCompact()#10524
Conversation
|
@jay-zhuang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
|
||
| #endif // ROCKSDB_LITE | ||
| // Experimental and subject to change | ||
| // Wait for the background flush and Compaction to finish. |
There was a problem hiding this comment.
I don't understand. Does it wait until the currently running background jobs finish or until there are no running background jobs? And that might be an instant until the next background job is started, right?
If there is no running flush or compaction, does it "wait for flush and/or compaction" as its name implies?
There was a problem hiding this comment.
(I constantly find myself reverse-engineering the TEST functions also because they have completely unclear meaning.)
There was a problem hiding this comment.
And that might be an instant until the next background job is started, right?
And it might never happen, right?
| #endif // ROCKSDB_LITE | ||
| // Experimental and subject to change | ||
| // Wait for the background flush and Compaction to finish. | ||
| // `wait_unscheduled` will wait for unscheduled job to be finished. It might |
There was a problem hiding this comment.
"unscheduled" is not a term used elsewhere in the public API. Please define it.
|
(Superseded by #11436) |
Add experimental API
WaitForFlushAndCompact()for waiting for backgroundflush and compaction jobs. The API could be useful for the user to wait the db
to be in a stable status.
Fix #10428
Test Plan: CI. the API is already wildly used in unittests