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

Collection context in the cache should always include indexes #138

Closed
apkar opened this issue Apr 4, 2019 · 0 comments
Closed

Collection context in the cache should always include indexes #138

apkar opened this issue Apr 4, 2019 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@apkar
Copy link
Contributor

apkar commented Apr 4, 2019

getUnboundCollectionContext() takes a parameter includeIndex to decide whether to include index to the collection context or not. Having a collection context without all the indexes could be useful, #137. But, this function also deals with the metadata cache. Even though the current caller doesn't care about indexes future callers might, as this function caches the context even the future callers wouldn't see the indexes. This is very bad for index consistency. We should just remove includeIndex parameter altogether and the caller can always make a copy of collection context and do anything they want to that copy.

@apkar apkar self-assigned this Apr 4, 2019
@apkar apkar added the bug Something isn't working label Apr 4, 2019
@apkar apkar added this to the 1.6.4 milestone Apr 4, 2019
apkar added a commit to apkar/fdb-document-layer that referenced this issue Apr 4, 2019
…ays include indexes.

getUnboundCollectionContext() should always return context with indexes
included.

As this function plays with cache, its good to not play with how it
creates collection context. Instead client of this function can make a
copy and do anything with it. Otherwise, we will find interesting
inconsistencies in the metadata cache.
@apkar apkar closed this as completed in fdb1a3e Apr 4, 2019
apkar added a commit that referenced this issue Apr 4, 2019
Resolves #138: Cache should always include collection context with indexes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant