Skip to content

[Rust] Preserve acknowledgement deadlines during Arrow Flight graceful close - #592

Draft
teodordelibasic-db wants to merge 1 commit into
effort/zerobus-sdk-per-batch-ack-deadlinesfrom
effort/zerobus-sdk-graceful-close-deadlines
Draft

[Rust] Preserve acknowledgement deadlines during Arrow Flight graceful close#592
teodordelibasic-db wants to merge 1 commit into
effort/zerobus-sdk-per-batch-ack-deadlinesfrom
effort/zerobus-sdk-graceful-close-deadlines

Conversation

@teodordelibasic-db

@teodordelibasic-db teodordelibasic-db commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

What changes are proposed in this pull request?

This is the final change in the stack and depends on the per-batch acknowledgement-deadline change.

This PR preserves Arrow Flight acknowledgement deadlines while a server-initiated graceful close is in progress.

  • Continue racing the oldest pending batch's acknowledgement deadline against the graceful-close deadline.
  • Recover at whichever deadline expires first.
  • Preserve the earliest close deadline when repeated close signals arrive instead of extending the recovery bound.
  • Apply a valid acknowledgement already ready at either deadline before deciding to recover.
  • Document that graceful close does not pause or extend pending acknowledgement deadlines.

Without this change, entering graceful close suppresses the acknowledgement timeout until the close wait ends. A server close signal can therefore extend the time an unacknowledged batch remains pending, and repeated signals can move that recovery bound further into the future.

How is this tested?

  • A unit test verifies an outstanding acknowledgement deadline still triggers recovery during a longer graceful-close window.
  • A unit test verifies repeated close signals can shorten but never extend the original close deadline.
  • A unit test verifies a valid acknowledgement already ready when the graceful-close or acknowledgement deadline expires wins the tie before recovery.

@teodordelibasic-db
teodordelibasic-db force-pushed the effort/zerobus-sdk-ack-deadlines branch from 44ed996 to 8f9f7c7 Compare July 27, 2026 16:22
@teodordelibasic-db
teodordelibasic-db force-pushed the effort/zerobus-sdk-graceful-close-deadlines branch from ea43ced to 1aeda06 Compare July 27, 2026 16:22
@teodordelibasic-db
teodordelibasic-db force-pushed the effort/zerobus-sdk-ack-deadlines branch from 8f9f7c7 to 280cfe5 Compare July 27, 2026 16:34
@teodordelibasic-db
teodordelibasic-db force-pushed the effort/zerobus-sdk-graceful-close-deadlines branch from 1aeda06 to 52117f3 Compare July 27, 2026 16:34
@teodordelibasic-db teodordelibasic-db changed the title [Rust] Preserve ACK deadlines during close [Rust] Preserve acknowledgement deadlines during Arrow Flight graceful close Jul 27, 2026
@teodordelibasic-db
teodordelibasic-db force-pushed the effort/zerobus-sdk-ack-deadlines branch from 280cfe5 to 1203a2f Compare July 27, 2026 16:39
@teodordelibasic-db
teodordelibasic-db force-pushed the effort/zerobus-sdk-graceful-close-deadlines branch from 52117f3 to d57185d Compare July 27, 2026 16:39
@teodordelibasic-db
teodordelibasic-db force-pushed the effort/zerobus-sdk-ack-deadlines branch from 1203a2f to 0fc8c1a Compare July 28, 2026 09:32
@teodordelibasic-db
teodordelibasic-db force-pushed the effort/zerobus-sdk-graceful-close-deadlines branch from d57185d to 3e6e1a2 Compare July 28, 2026 09:32
@teodordelibasic-db
teodordelibasic-db force-pushed the effort/zerobus-sdk-ack-deadlines branch from 0fc8c1a to 1203a2f Compare July 28, 2026 09:36
@teodordelibasic-db
teodordelibasic-db force-pushed the effort/zerobus-sdk-graceful-close-deadlines branch from 3e6e1a2 to d57185d Compare July 28, 2026 09:36
@teodordelibasic-db
teodordelibasic-db force-pushed the effort/zerobus-sdk-ack-deadlines branch from 1203a2f to 45e6faf Compare July 28, 2026 13:33
Signed-off-by: teodordelibasic-db <teodor.delibasic@databricks.com>
@teodordelibasic-db
teodordelibasic-db force-pushed the effort/zerobus-sdk-graceful-close-deadlines branch from d57185d to ef9641a Compare July 28, 2026 14:10
@teodordelibasic-db
teodordelibasic-db changed the base branch from effort/zerobus-sdk-ack-deadlines to effort/zerobus-sdk-per-batch-ack-deadlines July 28, 2026 14:11
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