Skip to content
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

Merged
merged 2 commits into from
Nov 28, 2016
Merged

Conversation

BusyJay
Copy link
Member

@BusyJay BusyJay commented Nov 25, 2016

const RAFT_LOG_GC_THRESHOLD: u64 = 50;
const RAFT_LOG_GC_LIMIT: u64 = 100000;
const RAFT_LOG_GC_COUNT_LIMIT: u64 = 100000;
Copy link
Contributor

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 &&
Copy link
Contributor

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.

Copy link
Member Author

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.

@siddontang
Copy link
Contributor

Rest LGTM

@BusyJay
Copy link
Member Author

BusyJay commented Nov 28, 2016

Ping

@zhangjinpeng87
Copy link
Member

LGTM

@BusyJay
Copy link
Member Author

BusyJay commented Nov 28, 2016

@siddontang PTAL

@siddontang
Copy link
Contributor

LGTM

@BusyJay BusyJay merged commit 530d769 into master Nov 28, 2016
@BusyJay BusyJay deleted the busyjay/schedule-log-gc-by-size branch November 28, 2016 09:15
iosmanthus pushed a commit to iosmanthus/tikv that referenced this pull request May 31, 2024
* 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]>
mittalrishabh pushed a commit to mittalrishabh/tikv that referenced this pull request Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants