Update tracing fork to PostgresNIO 1.33.1 - #1
Closed
0xpablo wants to merge 12 commits into
Closed
Conversation
…por#641) When the idle-timeout timer fires while a lease request is queued (because a keep-alive is consuming the connection's only stream), `connectionIdleTimerTriggered` takes the `rescheduleIdleTimer` path. That path replaced the stale idle timer with a fresh one but dropped the old timer's `cancellationContinuation` — a `CheckedContinuation<Void, Never>` registered by `ConnectionPool.runTimer`'s child task in `withCheckedContinuation`. Dropped without being resumed, the Swift runtime eventually emits: SWIFT TASK CONTINUATION MISUSE: runTimer(_:in:) leaked its continuation without resuming it. Fix: - `ConnectionState.rescheduleIdleTimer()` and `ConnectionGroup.rescheduleIdleTimer(_:)` now also return the old idle timer's `TimerCancellationToken`. - `PoolStateMachine.connectionIdleTimerTriggered(_:)` forwards that token via `.makeConnectionsCancelAndScheduleTimers` so `ConnectionPool.runConnectionAction` resumes the continuation before scheduling the new timer. A new regression test in `PoolStateMachineTests` drives the state machine into the exact race and asserts the returned action surfaces the old token. The test fails on `main` and passes with this fix. Signed-off-by: Lukas Tetzlaff <lukastetzlaff@gmail.com> Co-authored-by: Fabian Fett <fabianfett@apple.com>
Owner
Author
|
Validation complete: all ten CI jobs passed on d38dbc7, and 1.33.1-goodnotes.1 has been tagged and released. Closing this temporary validation PR without merging into main. |
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.
Temporary validation PR for the
1.33.1-goodnotes.1release. This forward-ports the existing distributed tracing feature onto upstream PostgresNIO 1.33.1 and updates swift-distributed-tracing to 1.4.1. The PR will be closed after the full CI matrix validates the release commit; the old tracing branch remains untouched.