[Rust][Arrow] Move explicit close into supervisor - #680
Open
teodordelibasic-db wants to merge 10 commits into
Open
[Rust][Arrow] Move explicit close into supervisor#680teodordelibasic-db wants to merge 10 commits into
teodordelibasic-db wants to merge 10 commits into
Conversation
teodordelibasic-db
force-pushed
the
effort/zerobus-sdk-supervisor-owned-close
branch
2 times, most recently
from
August 6, 2026 14:33
a4094a4 to
f54f167
Compare
teodordelibasic-db
force-pushed
the
effort/zerobus-sdk-supervisor-owned-close
branch
4 times, most recently
from
August 7, 2026 12:16
210d399 to
6a51383
Compare
Signed-off-by: teodordelibasic-db <teodor.delibasic@databricks.com>
teodordelibasic-db
force-pushed
the
effort/zerobus-sdk-supervisor-owned-close
branch
2 times, most recently
from
August 7, 2026 13:48
8426691 to
fee72c8
Compare
Signed-off-by: teodordelibasic-db <teodor.delibasic@databricks.com>
teodordelibasic-db
force-pushed
the
effort/zerobus-sdk-supervisor-owned-close
branch
from
August 7, 2026 13:54
fee72c8 to
0e87af3
Compare
Signed-off-by: teodordelibasic-db <teodor.delibasic@databricks.com>
Signed-off-by: teodordelibasic-db <teodor.delibasic@databricks.com>
Signed-off-by: teodordelibasic-db <teodor.delibasic@databricks.com>
Signed-off-by: teodordelibasic-db <teodor.delibasic@databricks.com>
Signed-off-by: teodordelibasic-db <teodor.delibasic@databricks.com>
Signed-off-by: teodordelibasic-db <teodor.delibasic@databricks.com>
Signed-off-by: teodordelibasic-db <teodor.delibasic@databricks.com>
Signed-off-by: teodordelibasic-db <teodor.delibasic@databricks.com>
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.
What changes are proposed in this pull request?
Arrow explicit close previously depended on caller-side flush completion before supervisor teardown could begin. During recovery, that allowed backoff, reconnect setup, ready-signal waiting, credential invalidation, or replay to continue until a separate timeout resolved the phase.
This PR moves explicit-close coordination and finalization into the Arrow stream supervisor. The close target and original deadline are published together while holding the ingestion mutex, and the supervisor owns the single teardown.
close()publishes an irreversible close request; if that future is cancelled, ingestion remains closed and callers must invokeclose()again to await completion.close()cannot hang and unacknowledged batches remain retrievable.This is an internal Rust SDK lifecycle change. It does not change public APIs, FFI signatures, ABI, or semver compatibility.
Remaining intentional limitations:
Fixes #657.
How is this tested?
close_outcome_and_publication_matrixtable-drives close-outcome precedence and publication/finalization transitions.close_during_rotation_ack_wait_preserves_rotation_statetable-drives close publication during rotation ACK waiting, including acknowledged, expired, late-ACK, and deadline-tie cases.test_close_finalizes_after_supervisor_abortcovers fallback both before close-state publication and after timeout selection, including late ACK accounting and exactly one half-close.test_empty_close_drains_post_eof_errorandtest_active_error_survives_post_deadline_ack_with_exact_suffixcover bounded empty-stream draining and the active-error plus post-deadline-ACK race.test_explicit_close_during_rotation_retains_buffered_suffixcovers close during rotation wait/drain, exact buffered-suffix retention, and a late drain ACK that must still returnDeadlineExceeded.test_close_interrupts_every_recovery_phasecovers setup, READY wait, replay, sender commit, and reconnect timeout;close_interrupts_backoff_and_prevents_sender_commitcovers deterministic backoff interruption.test_close_preserves_reconnect_auth_rejection_while_invalidation_completescovers detached authentication invalidation through stream drop.test_cancelled_close_rejects_ingest_and_resumes_teardowncovers cancellation-safe repeated close with the original deadline and result.pause_and_detach_waits_for_in_flight_ingestandfinalize_closed_waits_for_in_flight_ingestcover ingestion/finalization serialization.