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

fix: only flush dirty metrics #2418

Merged
merged 1 commit into from
Aug 18, 2021
Merged

Conversation

ldeffenb
Copy link
Collaborator

@ldeffenb ldeffenb commented Aug 17, 2021

Fixes #2417


This change is Reviewable

Copy link
Member

@acud acud left a comment

Choose a reason for hiding this comment

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

sorry @ldeffenb I got confused by the diff. Could I please ask to double check the the other usages of cs.dirty are correct?

@ldeffenb
Copy link
Collaborator Author

ldeffenb commented Aug 17, 2021

sorry @ldeffenb I got confused by the diff. Could I please ask to double check the the other usages of cs.dirty are correct?

Been there, done that. cs.dirty goes from 3 to 2, then 2 to 1, and 1 to 0 as it progresses down through saving. And it is set to 3 regardless of its current value when the metric is updated. I did all of those checks back when I was trying to understand what "dirty" was and that initial "if" statement.

@acud acud merged commit 87d83ed into ethersphere:master Aug 18, 2021
acud pushed a commit that referenced this pull request Aug 19, 2021
@acud acud added this to the v1.2.0 milestone Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kademlia peer metrics flush incorrect
3 participants