fix(derived data): Adjust auto-heal timeouts in response to operational realities - #125155
Merged
Merged
Conversation
cvxluo
approved these changes
Sep 22, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We're working on a more efficient approach here, but in the meantime, we recognize that running these long queries in a task with a relatively short deadline can be a problem.
Here we allow the task to run longer, give the (cachable) hash discovery query enough headroom to reliably suceeed even when not recently vacuumed, and add a timeout that we don't expect to hit to our group id batching.
The total deadline isn't enough for worst-cases everywhere, but due to discovery caching, if we can find one or two stale hashes and cache that, that's enough to make progress.
Similarly, on the group batching side, we need to be able to process at least one, ideally two hashes to make significant forward progress each run.
One key motivation here: we always prefer to hit statement timeouts over task timeouts. Evidence indicates that task timeouts don't abort the running query, not remotely, and not locally, and this seems correlated with task failures going unreported. OperationalErrors within the task deadline seem to report reliably.