feat: add retry support for SQL/HTTP activities and loop resilience - #44
Closed
Pino de Candia (pinodeca) wants to merge 1 commit into
Closed
feat: add retry support for SQL/HTTP activities and loop resilience#44Pino de Candia (pinodeca) wants to merge 1 commit into
Pino de Candia (pinodeca) wants to merge 1 commit into
Conversation
Pino de Candia (pinodeca)
force-pushed
the
pinodeca/retries
branch
2 times, most recently
from
March 9, 2026 14:47
33c1c73 to
779493c
Compare
- Add pg_durable.max_retries GUC (default 3, reloadable via SIGHUP) - Use duroxide schedule_activity_with_retry for SQL and HTTP nodes - Add retry with fixed backoff for status update activities - Capture max_retries at df.start() time for deterministic replay - Implement loop resilience: failed iterations are absorbed, loop continues - Add LoopMetrics tracking (successes, failures, consecutive failures) - Terminate loop after 10 consecutive failures (safety limit) - Add E2E tests for node retry and loop resilience - Update USER_GUIDE.md and api-reference.md with retry documentation
Pino de Candia (pinodeca)
force-pushed
the
pinodeca/retries
branch
from
March 9, 2026 14:57
779493c to
e65b255
Compare
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.
Summary
Implements the retry support proposal (Phases 1 & 2): automatic retries for SQL/HTTP activities and loop resilience for long-running loops.
Changes
Phase 1: Node Retries
pg_durable.max_retries(default 3, reloadable viapg_reload_conf())schedule_activity_with_retrywith exponential backoff (100ms base, 2x multiplier, 30s cap)update-node-status,update-instance-status) use fixed 1s backoff retrymax_retriesis captured atdf.start()time and stored inFunctionInputfor deterministic replayPhase 2: Loop Resilience
LoopMetricsstruct tracks total iterations, successes, failures, and consecutive failures acrosscontinue_as_newboundariesDocumentation
USER_GUIDE.md: New Configuration section with GUC reference, Loop Resilience subsection, updated Key Features and Quick Referencedocs/api-reference.md: Retry notes ondf.sql(),df.http(),df.loop()Tests
36_retry_node.sql: Verifies SQL node succeeds after transient failures (attempt 3/3), and fails after exhausting retries37_loop_resilience.sql: Verifies loop continues past intermittent failures, and terminates after consecutive failure limitDesign Decisions
df.start()timeTesting
All tests pass:
./scripts/test-all-local.sh✅