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

[Do Not Merge] Example of BindingIndex invalidation strategy's failure to handle reused (non-unique) identities. #59

Conversation

fancyremarker
Copy link
Contributor

Don't merge this, as it's just a failing spec to demonstrate the failure of the BindingIndex invalidation strategy to handle Mongoid::Identity bindings in cases where the document class uses non-unique slugs (i.e., slug without { :history => true }), and a slug gets reused on two different objects.

This is representative of a more general issue, where the BindingIndex invalidation strategy (by design) never updates the canonical binding reference for non-canonical bindings. So, if an invalid value is ever written to the canonical binding reference, the cache will never heal (except by calling invalidate_garner_caches directly on the non-canonical binding).

My opinion is that the current behavior should not be modified, but I wanted to at least document the issue.

cc: @dblock @dylanfareed

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.

None yet

1 participant