-
-
Notifications
You must be signed in to change notification settings - Fork 97
Implement a flush
command
#2396
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55d5186
to
42c802c
Compare
The new `flush` command causes VAST to decomission all currently active partitions, i.e., write all active partitions to disk immediately regardless of their size or the active partition timeout. This is particularly useful for testing, or when needing to guarantee in automated scripts that input is available for operations that only work on persisted passive partitions. The flush command returns only after all active partitions were flushed to the disk.
Explicit flushing after blocking imports makes many of our integration tests more reliable, reducing the risk of timing-related failures.
f8ec492
to
6b52021
Compare
lava
approved these changes
Jul 7, 2022
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.
Thanks for implementing this! The completion
parameter looks weird, but I wasn't able to come up with a better alternative after thinking about it for a while.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The new
flush
command causes VAST to decomission all currently active partitions, i.e., write all active partitions to disk immediately regardless of their size or the active partition timeout. This is particularly useful for testing, or when needing to guarantee in automated scripts that input is available for operations that only work on persisted passive partitions.The flush command returns only after all active partitions were flushed to the disk.
📝 Checklist
🎯 Review Instructions
Review changes commit-by-commit.
I recommend only glancing at the second commit, as that shuffles around a lot of integration test reference data because of newly inserted calls to
flush
.Code review should be almost trivial. Here's a high-level summary of the changes:
flush
command plugin that adds a single command without options.(atom::flush) -> void
handler in the index that decommissions all active partitions.index_state::decommission_active_partition
function now takes an optional completion handler so theflush
command doesn't return too early.