-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fix rollback when rollback to tail_lsn. #532
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 |
---|---|---|
|
@@ -166,11 +166,6 @@ class SampleLogStoreClient { | |
} | ||
|
||
void rollback_validate(uint32_t num_lsns_to_rollback) { | ||
|
||
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. why this is removed? 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. I believe @sanebay hit this issue when he was doing the log store long running... he worked around in the UT but with the fix in implementation we dont need this work around in UT. |
||
if (m_log_store->truncated_upto() == m_log_store->get_contiguous_completed_seq_num(-1)) { | ||
// No records to rollback. | ||
return; | ||
} | ||
if ((m_cur_lsn - num_lsns_to_rollback - 1) <= m_log_store->get_contiguous_issued_seq_num(-1)) { return; } | ||
auto const upto_lsn = m_cur_lsn.fetch_sub(num_lsns_to_rollback) - num_lsns_to_rollback - 1; | ||
m_log_store->rollback(upto_lsn); | ||
|
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.
nit: Can we also have an assert here for
HS_DEBUG_ASSERT(m_records.status(to_lsn + 1).is_out_of_range == false)
?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.
there are two angle,
https://github.com/eBay/sisl/blob/ed773dbb0c7e53f46b29374e477f4be3dc1db99b/include/sisl/fds/stream_tracker.hpp#L128
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.
the sisl one can be take as a bug, IMO.