Prevent transient table lookup errors from marking all partitions pending#9750
Prevent transient table lookup errors from marking all partitions pending#9750begelundmuller wants to merge 2 commits into
Conversation
|
@codex: review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d56a69bbc9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if !model.Spec.TriggerFull { | ||
| return runtime.ReconcileResult{ | ||
| Err: fmt.Errorf("failed to check if model output exists (trigger a full refresh to rebuild anyway): %w", err), | ||
| Retrigger: refreshOn, |
There was a problem hiding this comment.
Recompute a future retry time after lookup failures
When a scheduled model reaches its refresh time and Exists returns a transient error, refreshOn was computed from the last successful RefreshedOn, so it is already in the past. Returning that same value makes processCompletedInvocation treat the retrigger as immediate (inv.reschedule = true when the time is not after time.Now()), causing a tight reconcile loop that repeatedly hits the failing connector until it recovers. For this error path, use a future retry time such as nextRefreshTime(time.Now(), ...) instead of the stale scheduled time.
Useful? React with 👍 / 👎.
Exists()in the DuckDB and ClickHouse model managers swallowed all lookup errors, so a transient connectivity failure (e.g. an unreachable database ATTACHed viainit_sql) read as a missing table and escalated a scheduled refresh into a full reset.could not find tablenow saysfailed to look up table, since it wraps any lookup error; only genuine absence reports "does not exist".