-
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
skip append dummy logs to log dev #624
Conversation
86fefef
to
b78115c
Compare
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #624 +/- ##
==========================================
+ Coverage 56.51% 66.14% +9.63%
==========================================
Files 108 109 +1
Lines 10300 10988 +688
Branches 1402 1507 +105
==========================================
+ Hits 5821 7268 +1447
+ Misses 3894 3005 -889
- Partials 585 715 +130 ☔ View full report in Codecov by Sentry. |
b78115c
to
8f015e3
Compare
19878fd
to
b8f76c6
Compare
@sanebay pls also take a look |
b8f76c6
to
d4368df
Compare
d4368df
to
dc053d7
Compare
1. directly update indices when there are holes in baseline resync 2. update definition of logdev_key::out_of_bound_ld_key and use it to imply log dev can truncate freely. 3. remove is_active check in HomeLogStore::flush to unblock flush when there are holes in m_records
dc053d7
to
c6275a4
Compare
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.
LGTM, one small question
During the baseline resynchronization process, when a follower successfully receives a snapshot, it calls the compact function to truncate all logs that are no larger than snapshot.last_log_idx. In the current implementation, compact initially appends dummy logs up to snapshot.last_log_idx before truncating them. This operation is resource-intensive, and the size of the data waiting to be flushed can exceed the journal vdev's chunk size, posing a risk of system crashes.
This change eliminates the need to append dummy logs to the log device by directly updating certain indices. It also removes the dependency of log dev truncation on log store's LSN.