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

Cache by schema version #6847

Merged
merged 6 commits into from
Feb 15, 2024
Merged

Cache by schema version #6847

merged 6 commits into from
Feb 15, 2024

Conversation

fantix
Copy link
Member

@fantix fantix commented Feb 14, 2024

Drop integer dbver and replace it with the UUID schema_version, so that we can persist the query cache under consistent keys in the next steps.

dbver was bumped on config changes but schema_version is only for user schema. We handle this difference by adding such config into the compile cache key / PG state key.

get_session_config() for cache key should be optimized to honor affects_compilation, this is fixed in a future persistent cache PR.

@fantix fantix requested review from 1st1, msullivan and elprans February 14, 2024 21:16
Copy link
Member

@msullivan msullivan left a comment

Choose a reason for hiding this comment

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

This looks good, modulo the concerns I have about the changes to _config_cache invalidation

state.append(
{"name": '__dbver__', "value": dbver, "type": 'C'})
{"name": '__ver__', "value": ver, "type": 'C'})
Copy link
Member

Choose a reason for hiding this comment

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

Where are we actually reading this?

Copy link
Member

Choose a reason for hiding this comment

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

Also added comments to explain how to handle compilation with
a concurrent schema change.
@fantix fantix merged commit d258eb2 into master Feb 15, 2024
24 checks passed
@fantix fantix deleted the cache-by-schema-version branch February 15, 2024 17:18
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.

3 participants