Skip to content

fix(xfr): honour context cancellation during an in-flight transfer (F53) - #84

Merged
ersinkoc merged 2 commits into
mainfrom
audit/xfr-F002
Nov 4, 2026
Merged

ersinkoc merged 2 commits into
mainfrom
audit/xfr-F002

Conversation

@ersinkoc

@ersinkoc ersinkoc commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

After connecting, AXFR/IXFR ignored ctx cancellation. A stalled primary held the caller for the per-message timeout, delaying shutdown and catalog member removal.

Fix: context.AfterFunc(ctx, conn.Close) and return a wrapped ctx.Err() when cancelled.

Regression test: TestTransfer_ContextCancelUnblocksStalledPrimary (AXFR, IXFR, already-cancelled ctx). Verified 3x with -race.

transfer() only used ctx for the dial; a primary that stalled after the query
held AXFR/IXFR (and secondary shutdown / catalog withdrawal) for the
per-message timeout. Close the connection when ctx is cancelled.
@ersinkoc
ersinkoc merged commit 3325bed into main Nov 4, 2026
6 checks passed
@ersinkoc
ersinkoc deleted the audit/xfr-F002 branch November 4, 2026 12:56
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.

1 participant