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:
This content is subject to limited support.
Been seeing this errors a lot for us too. Did you happen to solve it yet?
A why would be handy here!
@IanT @pimchanok_w some details definitely got lost here in the move from our internal docs to the Knowledge Drop. Edited the original post with some more details 🙂
great thanks @rdunlavy
Is there any way to avoid this type of error? We have some long running queries in our system and a 1 hour cache time, so this comes up quite a bit.