-
Notifications
You must be signed in to change notification settings - Fork 287
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
Versioned namespaces #332
Versioned namespaces #332
Conversation
fea1062
to
eb2e715
Compare
Note: this make may performance somewhat less predictable, but fixes a real issue with the rollout of new schemas. Now the schema version that was in place as of the chose query revision will be the one that is used to calculate the answer uniformly across all nodes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
func filterToLiveObjects(revision datastore.Revision) memdb.FilterFunc { | ||
return func(hasLifetimeRaw interface{}) bool { | ||
obj := hasLifetimeRaw.(hasLifetime) | ||
return uint64(revision.IntPart()) < obj.getCreatedTxn() || uint64(revision.IntPart()) >= obj.getDeletedTxn() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind adding a comment here that the filter is inverted?
c5d6666
to
289c471
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR adjusts all namespace operations to work at a provided revision in order to guarantee request consistency in the face of namespaces changes.