Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inlining: Automatically migrate queries requiring inlining
When we fail to lookup a view for a query that has been cached but requires inlining, we now report the miss to the QueryStatusCache, so that the MigrationHandler can asynchronously create an inlined migration. The asynchronous migrated is gated behind an --experimental-placeholder-inlining flag. The QueryStatusCache stores the unsupported placeholders so that we know which placeholders require inlining when we attempt to migrate. The cache also stores an epoch which is used to count how many times the set of all inlined caches for a query has changed. When the migration handler receives a new set of parameters to inline into a query, it creates the inlined cache asynchronously and also updates the cached Views stored by noria so that we do not have to fetch these in the query request path. When an inlined query is executed, we must get the status of the query from the QueryStatusCache to see if the epoch has advanced. If it has, then we request a new view from ReadySet, update the cached statement, and prepare the statement against ReadySet if we have not yet done that. Release-Note-Core: Added an experimental feature to automatically inline placeholders in a query with literal values when the placeholders are unsupported, so that the query can be run against ReadySet. This feature is enabled with the --experimental-placeholder-inlining flag. This feature is experimental as it could degrade the performance of the ReadySet instance if too many inlined instances of a query are created. It is recommended that you drop the cache of any query with inlined placeholders with high cardinality. Change-Id: Ia058b8373f8d61f38f8b095a0da4b7bf9786c85c Reviewed-on: https://gerrit.readyset.name/c/readyset/+/4273 Tested-by: Buildkite CI Reviewed-by: Fran Noriega <fran@readyset.io>
- Loading branch information
Dan Wilbanks
committed
May 2, 2023
1 parent
241f066
commit 4a31acd
Showing
12 changed files
with
899 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.