router icon indicating copy to clipboard operation
router copied to clipboard

extend cache warmup to APQ, introspection and query analysis

Open Geal opened this issue 1 year ago • 0 comments

when reloading the router, we go through a warmup phase for the query planner, where we regenerate plans for the most used queries and fill the new cache with them. Right now this is not done for the other caches: APQ, introspection and query analysis

The APQ in memory cache could be directly carried over from one router instance to the next, since it does not depend on the schema (the APQ cache size might change with a configuration reload though). Keeping the APQ cache is the most important part here, because when starting from an empty cache, it will reject queries that it does not know and ask them to register it again. If we restart from a new cache, we should skip Redis insertions during warmup, as it will generate a large amount of traffic to the redis server when multiple router instances are reloading. Query analysis and introspection depend on the schema, so they need to be regenerated as well. Since the planner will need a valid instance of the compiler, we can go through the query analysis layer to generate it

Geal avatar Feb 07 '24 09:02 Geal