Skip to content

RavenDb control transport: TransportCompliance + leadership compliance, make ravendb:// first-class#3294

Merged
jeremydmiller merged 1 commit into
mainfrom
feat/ravendb-transport-leadership-compliance
Jul 5, 2026
Merged

RavenDb control transport: TransportCompliance + leadership compliance, make ravendb:// first-class#3294
jeremydmiller merged 1 commit into
mainfrom
feat/ravendb-transport-leadership-compliance

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Builds on the native RavenDB control queue merged in #3285 by (a) adding full compliance coverage and (b) promoting it to a first-class ravendb:// transport.

Compliance suites

  • control_transport_compliance — the standard TransportCompliance<T> battery over a Balanced two-node fixture sharing one embedded RavenDB store. 22/22, no skips (send-by-destination, publishing-rule, request/reply, dead-letter, requeue, scheduled retry, scheduled send, content-type serializer swap, endpoint health, …).
  • control_queue_leadership_election_compliance — the full LeadershipElectionCompliance battery over ravendb:// instead of UseTcpForControlEndpoint(). 13/13, covering fan-out, send-to-node, and leader failover on the native control queue.

Framework changes

Scheme rename ravencontrolravendb.

First-class transport registration. The control transport used to register lazily in RavenDbMessageStore.Initialize, so a config-time PublishAllMessages().To("ravendb://…") threw "Unknown Transport scheme". It's now registered eagerly in UseRavenDbPersistence (scheme resolves at bootstrap); the IDocumentStore is resolved lazily in the transport's InitializeAsync. The control endpoint only becomes a live listener when the message store promotes it to the NodeControlEndpoint under Balanced durability — so Solo hosts never poll and behavior is unchanged there.

Compliance harness. TransportComplianceFixture gains an overridable Mode (default Solo) so a control-plane transport that only wires its NodeControlEndpoint under Balanced can run the standard suite. Purely additive — every existing fixture stays Solo.

Note on schedule_send

Initially flapped because the leader-assigned scheduled-job agent wasn't assigned within the test window (default CheckAssignmentPeriod is 30s). Root cause was cadence, not the transport — the fixture tightens CheckAssignmentPeriod/ScheduledJobPollingTime, and it passes reliably.

Verification (local, embedded RavenDB, net9.0)

  • control_transport_compliance: 22/22
  • control_queue_leadership_election_compliance: 13/13
  • Regressions: existing control_queue_tests 3/3, TCP-based + control-queue leadership subset 6/6, core RavenDb durability/store suites 110/110.

🤖 Generated with Claude Code

…venDb control transport

Adds two compliance suites exercising the native RavenDB control queue added in
#3285, and promotes it to a first-class "ravendb://" transport so it can pass the
standard TransportCompliance battery.

Framework changes (Wolverine.RavenDb):
- Rename the control-transport scheme "ravencontrol" -> "ravendb".
- Register the RavenDbControlTransport eagerly in UseRavenDbPersistence so the
  "ravendb://" scheme resolves for publishing rules configured at bootstrap
  (previously it registered lazily in RavenDbMessageStore.Initialize, so a
  config-time PublishAllMessages().To("ravendb://...") threw "Unknown Transport
  scheme"). The IDocumentStore is resolved lazily in the transport's
  InitializeAsync. The control endpoint only becomes a live listener when the
  message store promotes it to the NodeControlEndpoint under Balanced durability,
  so Solo hosts never poll — no behavior change for Solo.

Compliance harness (Wolverine.ComplianceTests):
- TransportComplianceFixture gains an overridable Mode (default Solo) so a
  control-plane transport that only wires its NodeControlEndpoint under Balanced
  can run the standard suite. Purely additive; every existing fixture stays Solo.

Tests:
- control_transport_compliance: full TransportCompliance<T> over a Balanced
  two-node fixture sharing one embedded store — 22/22, no skips. Cluster cadence
  tightened in-fixture (CheckAssignmentPeriod/ScheduledJobPollingTime) so the
  leader-assigned scheduled-job agent is assigned promptly (the 30s default made
  schedule_send flap).
- control_queue_leadership_election_compliance: full LeadershipElectionCompliance
  over ravendb:// instead of UseTcpForControlEndpoint() — 13/13, covering
  fan-out, send-to-node, and leader failover on the native control queue.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jeremydmiller
jeremydmiller merged commit 760b933 into main Jul 5, 2026
26 checks passed
This was referenced Jul 9, 2026
This was referenced Jul 13, 2026
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