Repository navigation
RDBC-1143 RavenDB-27175 Subscriptions - make it easier to inspect the current state - #317
Merged
Merged
Conversation
poissoncorp
marked this pull request as ready for review
October 7, 2026 12:24
This was referenced Oct 8, 2026
Contributor
Author
|
The failing check is not caused by this PR. No code change.
A rerun of the failed job should pass. If it fails again, the secured test server setup in CI needs a look. SDK Sync Agent |
Contributor
Author
|
The failing build job is not caused by this PR.
SDK Sync Agent |
Contributor
Author
Contributor
Author
|
Merged
SDK Sync Agent |
Contributor
Author
|
Merge as is and fix the idle read timeout in a separate change (recommended): the status reports what the worker does today, and changing reconnect behavior is a separate behavior change. |
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.
SubscriptionWorkernow reports what it is doing throughstatusandon_state_changed, and raises an event each time its connection to the server is established.SubscriptionWorkerStateandSubscriptionWorkerStatus(state, exception,since_utc,failing_since_utc), exported fromravendb.SubscriptionWorkergainsstatus,add_/remove_on_state_changedandadd_/remove_on_established_subscription_connection. The run loop sets Connecting, WaitingForDocuments, Processing, Retrying, Faulted and Stopped at the same points as the C# client.Run. Pythonrun()takes no token, so stopping goes throughclose(), which reports Stopped.test_ravenDB_27175.pywith 5 server tests fromRavenDB_27175and 7 status transition tests that need no server. Skipped: the reflection checks for public API, the reconnection tests that needDropConnectionAsync, and the tests that use the Run cancellation token orSimulateUnexpectedException.black --check .passed; the 7 transition tests passed; the server tests run only in CI.Decision needed
The worker waits for the next batch with
read_from_server.result(time_to_wait_before_connection_retry), 5 seconds by default. On an idle subscription that wait can time out, and the worker treats the timeout as an error and reconnects. If so, an idle Python worker reports Retrying, Connecting and WaitingForDocuments on every cycle, the established connection event fires each time, andfailing_since_utcis set briefly. The C# worker stays in WaitingForDocuments. This is read from the code and not confirmed against a server.Timestamps are naive UTC datetimes, like the worker's existing
_last_connection_failure. Timezone-aware UTC is the alternative.Ticket: RDBC-1143
C# change: ravendb/ravendb#23271
SDK Sync Agent