Last tested: Aug 19, 2021
This error will happen on some merged result query runs, usually as a result of the cache being busted for one of the source queries.
Merged queries essentially work by running all source queries asynchronously, and then once all queries are marked as complete, the results of all source queries are fetched from cache and stitched together as defined in the merge.
This problem can arise when, while the underlying queries are running, the cache for one or more of the source queries expires.
For example in a simple merged query with two source queries, A and B, if results for query A were to already exist in the cache but B needed to run against the database, if the cache for query A expired between when query B started and when it finished running the results for query A would no longer be found in cache.
Alternatively, if query A did not have cache set but finished quickly, and the caching policy for query A was aggressive (e.g. max cache age of 30 seconds), then the cache for query A could expire before query B finished running.
The cache expiration here is determined by the model-level cache configuration, so this tends to come up more frequently on queries where one or more of the underlying explores have an aggressive cache busting policy (e.g. a datagroup with max_cache_age set to under 10 minutes).
There are some other causes of cache getting evicted early, but they’re much rarer, especially on Looker-hosted deployments. A couple I’ve seen:
- The disk on the Looker server where the query results cache is stored running out of space (monitoring exists on Looker-hosted deployments to avoid any issues like this)
- In clustered deployments, node-to-node connectivity issues preventing Looker from pulling the cached results from one node to another.