-
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
Inlined data #521
Inlined data #521
Conversation
raakella1
commented
Aug 22, 2024
- Do not allocate blks if data is not inlined
- Implement a basic version of is_resync_mode where we declare the follower to be in resync mode if the diff between leader_commit_lsn and his own last_log_idx from logstore is greater than a threshold
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 #521 +/- ##
===========================================
+ Coverage 56.51% 67.43% +10.91%
===========================================
Files 108 109 +1
Lines 10300 10421 +121
Branches 1402 1400 -2
===========================================
+ Hits 5821 7027 +1206
+ Misses 3894 2713 -1181
- Partials 585 681 +96 ☔ View full report in Codecov by Sentry. |
rreq->set_local_blkid(entry_blkid); | ||
uint32_t data_size{0u}; | ||
|
||
if ((jentry->code == journal_type_t::HS_DATA_LINKED) && (jentry->value_size > 0)) { |
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.
we should assert if data linked, value_size should > 0
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.
it is already asserted in repl_contxt_t::init(), no?
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.
Yes, we assert in the init
@@ -1188,4 +1198,11 @@ void RaftReplDev::on_log_found(logstore_seq_num_t lsn, log_buffer buf, void* ctx | |||
|
|||
void RaftReplDev::on_restart() { m_listener->on_restart(); } | |||
|
|||
bool RaftReplDev::is_resync_mode() { | |||
int64_t const leader_commited_lsn = raft_server()->get_leader_committed_log_idx(); |
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.
is get_leader_committed_log_idx
very light-weight operation (just a read) or it take some mutex while doing it? Asking since this is_resync_mode will be accessed quite frequently in I/O path, so would be good to double confirm.
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 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.
it should be fine.
@@ -261,6 +261,9 @@ table Consensus { | |||
|
|||
// Frequency to flush durable commit LSN in millis | |||
flush_durable_commit_interval_ms: uint64 = 500; | |||
|
|||
// Log difference to determine if the follower is in resync mode | |||
resync_log_idx_threshold: int64 = 100; |
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.
we might want to tune this number later with E2E env, I am fine with this number for now.