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

mvcc: use GaugeFunc metric to load db size when requested #8150

Merged
merged 2 commits into from
Jun 22, 2017

Conversation

heyitsanthony
Copy link
Contributor

Fixes #8146

Copy link
Contributor

@gyuho gyuho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. thanks

@heyitsanthony heyitsanthony force-pushed the update-db-size-defrag branch 2 times, most recently from 9d3a8d3 to 90faf88 Compare June 22, 2017 05:32
@heyitsanthony heyitsanthony changed the title v3rpc: update mvcc db size stats after defrag mvcc: use GaugeFunc metric to load db size when requested Jun 22, 2017
@heyitsanthony
Copy link
Contributor Author

the v3rpc way was racey and sort of a hack (and failing CI); I changed the metric in mvcc so prometheus loads the size from the backend instead of expecting mvcc to set it /cc @gyuho

@heyitsanthony heyitsanthony force-pushed the update-db-size-defrag branch 2 times, most recently from 5eb8d2e to fecfd15 Compare June 22, 2017 05:57
Relying on mvcc to set the db size metric can cause it to
miss size changes when a txn commits after the last write
completes before a quiescent period. Instead, load the
db size on demand.

Fixes etcd-io#8146
@gyuho
Copy link
Contributor

gyuho commented Jun 22, 2017

lgtm. CI failures are from grpc?

@heyitsanthony heyitsanthony merged commit 310a096 into etcd-io:master Jun 22, 2017
@heyitsanthony heyitsanthony deleted the update-db-size-defrag branch June 22, 2017 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants