-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
etcdutl Snapshot Status: TotalKey Calculation Inquiry #19253
Comments
Expect there is misaligment between definition of |
YES, I agree. But unfortunately, it would be a breaking change as it has already been included in 3.5 for a long time. But I won't against to make a breaking change in 3.7 if there is no strong objection from users & contributors. A better way is to run
|
Could you clarify what you mean by breaking change? How you expect users depend on the value? For me this is fix in metric value to be more accurate. There are no changes in structure, name or format of the metric that could impact how user interacts with it. |
In theory, users may
Changing the value may break users's expectation. In practice, I am not sure how many users use/depend on it, might not too many. Overall, I am not against make this breaking change. |
To be clearer, I agree that there is no format/struct change. I was saying changing the value is also a breaking change. For example, starting a brand new etcd instance, the default number of key is always 7 even there is no any key/value write. Now we are going to change it to 0. We don't know how it may affect user's test or any expectation. Again, overall, I am not against to make it more accurate. |
Thank you all for the discussion. If there are no objections, I'd like to submit a PR to the main branch to fix this issue by excluding built-in keys from the TotalKey calculation (without modifying any formatting or structural changes). This change would provide more accurate metrics for monitoring and debugging purposes, better aligning with users' expectations. Please let me know if there are any additional considerations I should be aware of. |
Please note that internally etcd uses the revision as the key, but I think we should count the number of the real keys from users perspective. For example, when you execute the same command
|
Discussed in #19012
Originally posted by jxustc December 5, 2024
Problem Description
When using the
etcdutl snapshot status
command, I've observed the following characteristics of TotalKey calculation:Case
During testing, I discovered that the TotalKey calculation includes keys from various internal buckets beyond the main key-value store:
Identified Included Keys
meta
bucket:term
scheduledCompactRev
confState
auth
bucket:authRevision
Specific Questions
Potential Implementation Approach
Besides this solution, could we possibly add a field to count the number of non-built-in key-value pairs in etcd?
Proposed Improvement
If appropriate, I am willing to submit a PR to implement this change.
The text was updated successfully, but these errors were encountered: