-
Notifications
You must be signed in to change notification settings - Fork 88
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
aborted rewrite-rewrite causes data loss #288
Labels
bug
Something isn't working
Comments
There are two phenomenons in my tests:
This issue can only explain 2, right? |
Both. As long as there's an on-going |
tabokie
added a commit
that referenced
this issue
Jan 30, 2023
A second attempt to fix #288. This PR introduces the concept of "atomic group". It is then used by rewrite-rewrite operation to make sure the rewrite of each region is perceived as an atomic operation. A group of writes is made atomic by each carrying a special marker. During recovery, log batch with the marker will be stashed until all parts of the group are found. Caveats for this approach is commented near `AtomicGroupBuilder`. Also fixed a bug that a partial rewrite-rewrite (due to batch being split) is not applied correctly. Signed-off-by: tabokie <xy.tao@outlook.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Say we have the data:
When doing rewrite on the whole rewrite queue, it panicked. The old rewrite queue is not cleaned up and only partial output is written:
After restart, only logs from
[11, 15]
will be recovered.The text was updated successfully, but these errors were encountered: