-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
raftstore: schedule log gc by size #1362
Conversation
const RAFT_LOG_GC_THRESHOLD: u64 = 50; | ||
const RAFT_LOG_GC_LIMIT: u64 = 100000; | ||
const RAFT_LOG_GC_COUNT_LIMIT: u64 = 100000; |
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.
need 100000 now?
@@ -1159,7 +1160,10 @@ impl<T: Transport, C: PdClient> Store<T, C> { | |||
let applied_idx = peer.get_store().applied_index(); | |||
let first_idx = peer.get_store().first_index(); | |||
let compact_idx; | |||
if applied_idx > first_idx && applied_idx - first_idx >= self.cfg.raft_log_gc_limit { | |||
if applied_idx > first_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.
add log and metric for exceeding limit.
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.
This is tracked by CompactLog command already.
Rest LGTM |
Ping |
LGTM |
@siddontang PTAL |
LGTM |
* rfstore: improve bucket reliability. Signed-off-by: Evan Zhou <[email protected]> * fix add overflow Signed-off-by: Evan Zhou <[email protected]> * skip same key update Signed-off-by: Evan Zhou <[email protected]> * add todo to remove version != 0 check Signed-off-by: Evan Zhou <[email protected]> * remove zero version check Signed-off-by: Evan Zhou <[email protected]> --------- Signed-off-by: Evan Zhou <[email protected]>
Signed-off-by: ekexium <[email protected]>
ref #1337
@siddontang @hhkbp2 @zhangjinpeng1987 PTAL