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

Clearer metrics Without LKK Delete #33

Merged
merged 5 commits into from
Jul 12, 2021
Merged

Conversation

tstone
Copy link
Collaborator

@tstone tstone commented Jul 12, 2021

Background

  • Makes the branching for last_known_value fallback clearer
  • Removes deletion of the last known value, until this can be confirmed to be safe

Tasks

  • Code of Conduct reviewed
  • Specs written and passing
  • Backwards-incompatible changes called out in this PR
  • Increment the version file (./lib/atomic_cache/version.rb) when applicable

@tstone tstone requested a review from lebeerman July 12, 2021 18:04
# if the value of the last known key is nil, we can infer that it's
# most likely expired, thus remove it so other processes don't waste
# time trying to read it
@storage.delete(lkk)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Dropping delete here, as we don't yet know if this is 100% safe. Added a metric in its place.

Comment on lines +122 to +124
metrics(:increment, 'last-known-value.nil', tags: tags)
else
metrics(:increment, 'last-known-value.not-present', tags: tags)
Copy link
Contributor

Choose a reason for hiding this comment

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

📏 Measure all teh things!

Copy link
Contributor

@lebeerman lebeerman left a comment

Choose a reason for hiding this comment

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

👀 ->🔒 🎁 ?

@tstone tstone merged commit bb18a80 into main Jul 12, 2021
@tstone tstone deleted the bugfix/clearer-metrics-no-delete branch July 12, 2021 18:16
@tstone tstone restored the bugfix/clearer-metrics-no-delete branch July 13, 2021 20:54
@onyxraven onyxraven deleted the bugfix/clearer-metrics-no-delete branch May 5, 2023 15:07
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.

2 participants