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

Bring key+attempt formatting in line with Dalli #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Deconstrained
Copy link

@Deconstrained Deconstrained commented Mar 31, 2020

If the server for the key isn't found in the ring on the first iteration, then the new hash key in all subsequent attempts won't be generated in the same way as in the Dalli library.

This PR fixes it.

In Dalli it's {attempt}{key}, versus {key}:{attempt} (current, incompatible)

See:
https://github.com/petergoldstein/dalli/blob/b895ae1f99eafd542d34662c61ac627b344eed71/lib/dalli/ring.rb#L39

If the server for the key isn't found in the ring on the first attempt (i.e. due to a server getting replaced/going offline) then the new hash key in all subsequent attempts won't be generated in the same way as in dalli.

@Jonathan-Arias discovered this; see:

https://github.com/petergoldstein/dalli/blob/b895ae1f99eafd542d34662c61ac627b344eed71/lib/dalli/ring.rb#L39
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.

1 participant