Skip to content

fix: coordinate replication shutdown - #211

Merged
bmuddha merged 1 commit into
masterfrom
fix/replication-shutdown
Nov 13, 2026
Merged

bmuddha merged 1 commit into
masterfrom
fix/replication-shutdown

Conversation

@bmuddha

@bmuddha bmuddha commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

What changed

Allow a verifier stopped during reconnect to release its execution barrier at the established durable cursor. The pacemaker can then finish storage shutdown and persist the current AccountsDB checksum. Shutdown that starts while connected still drains to the next replicated block, including across a reconnect.

Track server connection workers in the dispatcher, reap completed workers during normal operation, and join the remaining workers before reporting termination. Blocking transfers stay off the async runtime and use the existing socket timeouts.

Closes #209
Closes #210

Impact

Avoids reconnect backoff blocking verifier shutdown and forcing snapshot recovery on promotion. Successful dispatcher shutdown now waits for its connection workers to release their resources. No wire or storage format changes.

Reviewer notes

The dispatcher assumes a healthy listener; accept errors and worker failures are logged and isolated. Socket timeouts bound individual I/O operations, not an entire snapshot transfer; the existing shutdown-tier timeout remains unchanged.

The client fix was exercised remotely before the final control-flow refactor: 40 writes replicated, offline verifier shutdown completed successfully in 152 ms, promotion validated AccountsDB without recovery, and all transaction responses and eight account images matched. The server change has only been exercised locally; dedicated stalled-receiver and worker-panic scenarios remain unverified.

@bmuddha bmuddha added the bug Something isn't working label Nov 13, 2026
@bmuddha bmuddha self-assigned this Nov 13, 2026
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@bmuddha
bmuddha marked this pull request as ready for review November 13, 2026 09:45
@bmuddha
bmuddha merged commit 2650f3d into master Nov 13, 2026
13 checks passed
@bmuddha
bmuddha deleted the fix/replication-shutdown branch November 13, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reconnect can block verifier shutdown and leave a stale AccountsDB checksum Join replication workers before completing shutdown

1 participant