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
add RawKV GC metric versions count #12523
Conversation
Signed-off-by: ystaticy <y_static_y@sina.com>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
@@ -196,6 +196,8 @@ impl RawCompactionFilter { | |||
if commit_ts.into_inner() >= self.safe_point { | |||
return Ok(CompactionFilterDecision::Keep); | |||
} | |||
|
|||
self.versions += 1; |
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.
Should only entries with !raw_value.is_valid()
be counted ?
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.
In txn gc of compaction_filter.rs records will self.versions += 1;
,
which is not match commit_ts > self.safe_point || value_type != CompactionFilterValueType::Value
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.
versions
means: Total stale versions meet by compaction filters.
It is defined in CompactionFilterStats
pub struct CompactionFilterStats {
pub versions: Cell<usize>, // Total stale versions meet by compaction filters.
pub filtered: Cell<usize>, // Filtered versions by compaction filters.
pub last_report: Cell<Instant>,
}
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.
Get ~
/run-test |
1 similar comment
/run-test |
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~
/run-test |
1 similar comment
/run-test |
/run-test |
1 similar comment
/run-test |
/merge |
@iosmanthus: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: ef23ecf
|
/run-test |
@ystaticy: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
ref tikv#12535 Signed-off-by: ystaticy <y_static_y@sina.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Signed-off-by: ystaticy y_static_y@sina.com
What is changed and how it works?
Issue Number: Ref #12535
What's Changed:
Check List
Tests
Test steps as follows:
enable-ttl = true
api-version = 2
total
value is not always 0.