Skip to content

Wait out a shadow restart in oracle resolve - #235

Open
iskakaushik wants to merge 1 commit into
mainfrom
oracle-wait-shadow-restart
Open

iskakaushik wants to merge 1 commit into
mainfrom
oracle-wait-shadow-restart

Conversation

@iskakaushik

@iskakaushik iskakaushik commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Continue work from #234.

When shadow PostgreSQL crashes, restarting it and recovering can take longer than oracle connection retries allow. In deployment described in #233, recovery took 2.5 minutes. Walshadow gave up while shadow was still recovering and exited.

Keep retrying oracle connection failures while session remains active, with increasing delays capped by existing backoff settings. Replace proposed 15-minute limit with retries that stop when session shuts down or a failed pipeline leg drains. Interrupt retry delays during shutdown so an unavailable shadow cannot hold up teardown. Healthy batches can still finish.

Errors returned by a running worker still fail immediately. retry_max_attempts continues to limit ClickHouse inserts but no longer limits oracle retries.

Regression tests cover retries continuing beyond configured attempt count and several simulated hours, shutdown interrupting a long retry delay, and worker errors failing without retries.

@iskakaushik
iskakaushik added this pull request to stack #236 October 20, 2026 04:05
Base automatically changed from shadow-park-backlog to main October 23, 2026 01:27
@serprex
serprex force-pushed the oracle-wait-shadow-restart branch from 20d8b0e to 93efac7 Compare October 23, 2026 02:59
Shadow restart and crash recovery can outlast oracle retry budget,
causing resolver to mark pipeline fatal while shadow is recovering.

Retry transport failures without an attempt or elapsed-time limit,
using existing capped backoff. Stop retries and interrupt backoff
when session shuts down or failed pipeline leg drains, so shadow
outage cannot hold up teardown. Continue draining healthy batches.

Keep worker-reported errors fatal and leave retry_max_attempts
bounding ClickHouse inserts only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@serprex
serprex requested a review from harshil-goel October 23, 2026 03:33
@serprex
serprex force-pushed the oracle-wait-shadow-restart branch from 93efac7 to f803107 Compare October 23, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants