Skip to content

feat(qwp): add owned_by to name the owner of the tables a sender auto-creates - #130

Merged
glasstiger merged 13 commits into
mainfrom
ia_qwp_owned_by
Nov 30, 2026
Merged

glasstiger merged 13 commits into
mainfrom
ia_qwp_owned_by

Conversation

@glasstiger

@glasstiger glasstiger commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Tandem

Companion to questdb/questdb#8504 and questdb/questdb-enterprise#1572; docs in questdb/documentation#652. Matching branch ia_qwp_owned_by.

Problem

QWP ingestion auto-creates the tables and columns a sender writes, and QuestDB Enterprise grants the creator the owner permissions on them. An external user, one authenticated with an OIDC token such as an Entra ID managed identity, cannot hold permissions, so it could not auto-create anything over QWP. SQL solves this with OWNED BY; QWP had no equivalent.

Changes

  • owned_by=<name> connect-string key (an ingress key in ConfigSchema) and LineSenderBuilder.ownedBy(String). ws/wss only: http, tcp and udp connect strings and builders reject it. The QwpQueryClient accepts it as a no-op, like the other ingress keys.
  • The sender sends it as X-QWP-Owned-By on every upgrade, reconnects, failovers and background drainers included. The value is percent-encoded UTF-8 (RFC 3986 unreserved characters as they are, upper-case hex digits), so names outside ASCII survive.
  • The upgrade fails unless the server echoes the owner: a server that predates the header ignores it, and the tables it creates would not get the owner. The failure is a QwpOwnedByMismatchException, a non-421 WebSocketUpgradeException that ends the connect round, also when another endpoint of the round answered 421: like a missing durable-ack echo, it comes from a writable endpoint that lacks the capability, so the round reports it instead of a missing primary. It names that endpoint, in its message and in getHost()/getPort(), as a missing durable-ack echo does. It carries no HTTP status (STATUS_NONE), as the server answered 101, so connection health reports none, as for a missing durable-ack echo.
  • What follows the failure depends on who connects, as for a missing durable-ack echo: the initial connect fails; a sender that has connected before keeps retrying, with no time limit, while store-and-forward holds the rows; an orphan drainer rides it out within the capability-gap settle budget it shares with a missing durable-ack echo (16 consecutive sweeps or reconnect_max_duration_millis of gap time, whichever comes first), then quarantines the slot behind a .failed sentinel. A primary that still lacks the feature when that budget runs out, late in a rolling upgrade for example, quarantines the orphan slots a sender adopted in the meantime.
  • A connect round that meets a capability gap, a missing owned_by or durable-ack echo, after a plain non-421 upgrade failure such as a proxy's 503, now reports the gap when another endpoint answered 421, as it does in any other order. It reported a missing primary before. Fixes Durable-ack mismatch reported as a missing primary in mixed connect rounds #131.
  • A rejected upgrade now carries the plain-text body of the response as its reason, when it arrived with the headers: length-capped, sanitized with CredentialRedaction, appended to the WebSocketUpgradeException message and exposed as QwpAuthFailedException.getReason(). A refused owner (403) reads auth-rejected: ... [reason=owned_by refused: bob is not part of group team] instead of looking like a rejected credential.
  • New master QwpWebSocketSender.connectWithCredentialSupplier(...) overload with ownedBy; the previous master delegates to it with null.

Tests

  • QwpOwnedByTest: the header and its canonical encoding, including the ends of the unreserved ranges, the echo accepted, missing and mismatched, the endpoint that failure names, the header sent again on a reconnect, the reject reason with and without a body, its absence when the body is unusable (a Content-Length beyond the bytes received, malformed or not positive, another content type, a blank body), its sanitizing and length cap, both sender build paths (connect string and builder), a 403 refusal surfacing as QwpAuthFailedException with its reason, connect rounds that also meet a replica's 421 reporting the missing echo, also behind a 503, and the 403 refusal rather than a missing primary, and connection health on a missing echo.
  • BackgroundDrainerEndToEndTest: an orphan drainer's upgrade names the owner too, and the sender's own drain walk rides out an endpoint that leaves the echo out for two sweeps.
  • BackgroundDrainerDurableAckRetryTest and BackgroundDrainerMidDrainCapabilityGapTest: an unconfirmed owner, at the initial connect and mid-drain, is ridden out within the settle budget and quarantines the slot once the budget runs out, with a reason that names owned_by and the endpoint; it shares one budget with a missing durable-ack echo and fires no durable-ack listener callback.
  • WriteFailoverTest: a 503, a primary without durable ack and a replica, walked in that order, report the durable-ack mismatch.
  • LineSenderBuilderWebSocketTest, WsSenderConfigHonoredTest and QwpQueryClientFromConfigTest: parsing, validation and the key-registry drift guard.
  • The server side is covered end to end in the OSS and Enterprise PRs.

… auto-creates

The owned_by connect-string key, and LineSenderBuilder.ownedBy(), name the user,
group or service account that QuestDB Enterprise grants the owner permissions on
every table and column the sender auto-creates, as OWNED BY does in SQL. An
external (OIDC) user cannot hold those permissions itself, so it must name one of
its groups to auto-create anything.

- The sender sends the owner as X-QWP-Owned-By, percent-encoded UTF-8, on every
  upgrade, reconnects and failovers included. WebSocket only: http, tcp and udp
  connect strings and builders reject it.
- The upgrade fails unless the server echoes the owner, so a server that
  predates the header fails the connection instead of creating tables without
  the owner. The failure is a non-421 WebSocketUpgradeException, which the
  connect walk treats as terminal.
- A rejected upgrade now carries the plain-text body of the response as its
  reason, sanitized and length-capped, in WebSocketUpgradeException and in
  QwpAuthFailedException (getReason()), so a refused owner is told apart from a
  rejected credential.
The owned_by helpers were inserted between pollDurableAckRequest() and
its javadoc, which then documented pollOwnedByRequest() instead. Move
the javadoc back, give the new helpers their own, and attach an older
javadoc that sat loose above them to setSuppressDurableAckHeader(),
the method it describes.
WebSocketClient.upgrade() throws WebSocketUpgradeException with status
101 when the server completes the upgrade without echoing the owned_by
the client asked for, but the class javadoc still said the exception
means a non-101 status. The javadoc now names that case.
Tests now pin the parts of owned_by and of the upgrade reject reason
that nothing checked before:

- A reconnect and an orphan drainer's upgrade send X-QWP-Owned-By
  again, not only the first connect (QwpOwnedByTest,
  BackgroundDrainerEndToEndTest).
- The reject reason stays null when the Content-Length exceeds the
  bytes received, is malformed or not positive, the body is not
  text/plain, or it is blank, and it reaches messages only sanitized
  and capped at 256 characters. TestWebSocketServer can now send
  reject headers that do not describe the body.
- encodeOwnedBy keeps the ends of the unreserved ranges and encodes
  the characters just outside them, as the server's re-encoded echo
  must match it byte for byte.

The owned_by echo failure now carries STATUS_NONE instead of 101: the
server answered 101 and rejected nothing, so Sender.health() reports
status 0 for it, as it does for the durable-ack gap and as
ConnectionHealth documents.

The ownedBy() javadoc no longer says the built-in admin may name any
entity: Enterprise refuses an external user as the owner, the admin's
choice included.
WebSocketClient's comment on the owned_by echo check said that the
connect walk latches a missing echo as terminal. That holds for the
initial connect and for an orphan drainer, but a sender that has
connected before keeps retrying the error, as
QwpOwnedByTest.testHealthReportsUnconfirmedOwnedByWithoutStatus
asserts. The comment now says so, and so does the test helper that
repeated it.

TestWebSocketServer's suppressOwnedByEcho flag becomes
isOwnedByEchoSuppressed, set with setOwnedByEchoSuppressed(), as the
project names booleans with an is or has prefix.
A connect round that met a 421 role reject on one endpoint demoted a
101 without the owned_by echo from another endpoint to a role
mismatch, as it demotes every plain non-421 upgrade error. build()
then reported a missing primary, an async sender retried forever while
its health said every endpoint was a replica, and the real cause
survived only as a suppressed exception.

The missing or mismatched echo now throws QwpOwnedByMismatchException,
a WebSocketUpgradeException that the round epilogue does not demote:
like a missing durable-ack echo, it comes from a writable endpoint
that lacks the capability. A sender fails its initial connect with it
and an orphan drainer quarantines its slot, as they already did with a
single endpoint, and a sender that has connected before keeps
retrying it.

QwpOwnedByTest covers both mixed rounds: a 101 without the echo, and a
403 refusal, which surfaces with its reason.
@glasstiger

Copy link
Copy Markdown
Contributor Author

Review: questdb-enterprise#1572 + questdb/questdb#8504 (+ #130)

Tandem review at level 3 of questdb-enterprise 187bdb097, questdb c5f7ed703 and java-questdb-client 017caf5.

Verdict: approve for #1572, #8504 and #130. There are no Critical or Moderate findings, and the one Minor test-hygiene item has since been fixed.

Critical

None.

Moderate

None.

Minor (fixed)

[OSS] core/src/test/java/io/questdb/test/cutlass/websocket/QwpIngressUpgradeProcessorOnHeadersReadyTest.java:521

  • Problem: The assertNull(securityContext.owner) check could never fail.
  • Net impact: None for users; it was a dead check in a new test.
  • Evidence: Static, at c5f7ed703. testOnHeadersReadyFailsHardWhenRefusedOwnedByResponseDoesNotFitBuffer builds OwnerRecordingSecurityContext("bob is not part of group team"), whose setAutoCreateOwner throws before it assigns owner (lines 1552–1555). So owner stayed null whatever negotiateOwnedBy did. The rest of the test still checks the 403 overflow, that nothing is sent and that no state is allocated.

Fixed in questdb 98cd2ed5fc, which questdb-enterprise picks up in 898a0ab5c.

Coverage

The test gate passes, with no coverage gaps that block or need a fix.

The two testOwnedBySurvivesRoleRoundTrip tests (ACL and OIDC) were run at the reviewed revision. In each, one upgrade names the owner, the same connection survives the switch to REPLICA and back, and only then auto-creates the second table and the new column, both granted to the named group. So the tests exercise DispatchingSecurityContext naming the owner again on the re-resolved delegate, not a reconnect.

Summary

  • Correctness gate: passes; there is no Critical finding.
  • Severity: 0 Critical, 0 Moderate, 1 Minor (in-diff, fixed).
  • Every callsite of the changed symbols was checked across questdb-enterprise, questdb and the client. That covered SQL and ILP DDL owner resolution, in-place role switches with live QWP connections, concurrent CREATE and ALTER, and the client's store-and-forward reconnect and orphan-drainer paths.
  • Submodule provenance:
  • Titles and descriptions follow Conventional Commits and describe user impact.

Intended behaviour change, worth a release note: an external (OIDC) principal that names no owner is now refused (SECURITY_ERROR) before any QWP auto-create, including adding a new column to an existing table. The PR body states this, and testAutoCreateRefusedWithoutOwnedBy pins it. OIDC producers that rely on column auto-creation will need client 1.3.13 and owned_by after the server upgrade.

An orphan drainer quarantined its slot on the first connect round in
which a writable endpoint answered 101 without the X-QWP-Owned-By echo.
Such an endpoint lacks the feature, as one without durable ack lacks
that, and a rolling upgrade or a failover back to an upgraded node
clears it. Yet the drainer took the missing echo for a rejected upgrade
and set the slot's rows aside behind a .failed sentinel that nothing in
production clears, where a missing durable-ack echo gets a settle
budget of 16 sweeps for exactly this reason.

BackgroundDrainer now counts QwpOwnedByMismatchException toward the
same capability-gap episode as QwpDurableAckMismatchException, and
quarantines the slot only once that budget runs out, with a reason that
names owned_by. Mid-drain, CursorWebSocketSendLoop hands the exception
back to the drainer as a capability-gap terminal rather than a final
one, so the drainer re-enters the budget. The durable-ack listener
callbacks keep reporting durable ack only. A sender that has connected
before keeps retrying, and the initial connect still fails at once.

Tests cover the ride-out, the escalation and the shared budget at the
initial connect, the same mid-drain, and the sender's own connect walk
against a server that leaves the echo out for two sweeps.
@glasstiger

Copy link
Copy Markdown
Contributor Author

Review: questdb/questdb-enterprise#1572 + questdb/questdb#8504 + #130

Tandem review at level 3 of questdb-enterprise 898a0ab5c, questdb 7dc4950814 (the head of questdb/questdb#8504; the enterprise branch still pins 98cd2ed5fc) and java-questdb-client 033d87af.

Verdict: approve for questdb/questdb-enterprise#1572, questdb/questdb#8504 and #130. There are no Critical or Moderate findings. The one Minor item has since been fixed.

Critical

None.

Moderate

None.

Minor (fixed)

[ENT] questdb-ent/src/test/java/com/questdb/security/DispatchingSecurityContextCoverageTest.java:176

  • Problem: The test comment called the owner delegate state, "like OWNED BY".
  • Net impact: None for users. It could mislead maintainers about what happens to the owner in a role switch.
  • Evidence: Static, at 898a0ab5c. DispatchingSecurityContext.java:103-104 and the class javadoc at :31-34 say the opposite: the proxy holds the owner itself, unlike OWNED BY, so that it survives a role switch.

Fixed in questdb-enterprise 45496e263.

Coverage

The test gate passes, with no coverage gaps.

The enterprise owner suites pass at questdb-enterprise 898a0ab5c with questdb 7dc4950814 and client 033d87af. That is 105 tests across QwpWebSocketOidcTest, QwpWebSocketAclTest, AdminSecurityContextTest, ReplicaAdminSecurityContextTest, EntSecurityContextBaseTest, DispatchingSecurityContextProxyTest and DispatchingSecurityContextCoverageTest.

In that run, the OIDC concurrent-create test took the retriable "table is being created" branch. QwpTudCacheAutoCreateOwnerTest also covers that branch deterministically.

Summary

  • Correctness gate: passes. Test gate: passes.
  • Severity: 0 Critical, 0 Moderate, 1 Minor (in-diff, fixed).
  • Every callsite of the changed symbols was checked across questdb-enterprise, questdb and the client. That covered:
    • owner resolution in EntDdlListener for SQL, ILP, CSV import and mat-view DDL;
    • every SecurityContext implementation;
    • the client's store-and-forward reconnect and orphan-drainer paths;
    • the order of the in-place role switch against the 421 gate.
  • Submodule provenance:
  • CI: the latest questdb run has one red job, WalWriterFuzzTest.testConvertPartitionToParquet on linux-arm64 ("ascii flag set to 'true' for non-ASCII value"). It is a known flaky failure, tracked in WalWriterFuzzTest.testConvertPartitionToParquet reads a non-ASCII VARCHAR value flagged as ASCII questdb#8353. That issue was opened on 2026-11-12, before this branch's first commit, for the same assertion on another PR. This change does not touch the Parquet VARCHAR path it fails in. Enterprise CI is green.
  • Titles and descriptions follow Conventional Commits and describe user impact.

Intended behaviour changes, worth a release note:

  • An external (OIDC) user with no owned_by is now refused (SECURITY_ERROR) before any QWP auto-create, including a new column on an existing table. Such producers need client 1.3.13 and owned_by.
  • A sender configured with owned_by fails to connect to a server that predates the feature, by design.

A connect round latches its first non-421 upgrade failure, and a 421
from another endpoint demotes a plain one, such as a proxy's 503, to
a role mismatch. When that plain failure came before an endpoint that
answered 101 without the durable ack or the owned_by echo the sender
asked for, the demotion hid the capability gap as well. The initial
connect then reported "no endpoint matches target=PRIMARY", a SYNC
connect retried it for its whole reconnect budget, and an ASYNC one
never failed, while the same endpoints in another order reported the
gap.

connectWalk now keeps the round's first capability gap apart from the
latch and throws it when the 421 demotes the latched error, which it
attaches as suppressed. A round without a 421 behaves as before.

QwpOwnedByTest and WriteFailoverTest walk a 503, a primary without
the echo and a replica, in that order.

Fixes #131
@glasstiger

Copy link
Copy Markdown
Contributor Author

Review: questdb/questdb-enterprise#1572 + questdb/questdb#8504 + #130

Tandem review at level 3 of questdb-enterprise 84bb775c8 (base dbf3d0497), questdb 6b81fb48bc (base b4e3c1167c) and java-questdb-client 9e9ab4fb (base 0f6c100c).

Verdict: approve for questdb/questdb-enterprise#1572, questdb/questdb#8504 and #130. There are no Critical, Moderate or Minor findings.

Critical

None.

Moderate

None.

Minor

None.

Coverage

The test gate passes, with no coverage gaps that block or need a fix.

Summary

  • Correctness gate: passes. Test gate: passes.
  • Severity: 0 Critical, 0 Moderate, 0 Minor.
  • Submodule provenance:
  • Every caller of the changed code was checked across questdb-enterprise, questdb and the client. That covered:
    • owner resolution in EntDdlListener for SQL, ILP, CSV import, views and mat views, which is unchanged when no owner is named;
    • every security context class, including DispatchingSecurityContext across role switches and the shared anonymous contexts. The HTTP security context is built per request, so the owner cannot leak to other requests or connections;
    • the order of the 421 role check and the owner check, and that the read-only marker survives both new refusal points;
    • table and column auto-create over QWP WebSocket and UDP, including the commit-batch path and the rename cases;
    • the client's reconnect after the initial connect, which retries owner failures with no time limit, the orphan drainers' settle budget and the mixed-round error reporting.
  • Titles and descriptions follow Conventional Commits and describe user impact.
  • CI: questdb and java-questdb-client are green. questdb-enterprise has two jobs still running; its "check oss is mergeable" job fails only because the submodule points at the open feat(qwp): let QWP senders choose the owner of the tables and columns they auto-create questdb#8504 branch.

Behaviour changes worth a release note:

  • An external (OIDC) user without owned_by now gets a final SECURITY_ERROR before any QWP auto-create, including a new column on an existing table. Before, such a column was created but got no owner. These producers need client 1.3.13 and owned_by. The PR documents this.
  • A sender configured with owned_by fails its initial connect against a server that predates the feature, by design.
  • QWP over UDP: a datagram that adds a column to a table renamed while the receiver held it in its table cache is now dropped. Before, it landed in the renamed table. The receiver recovers at its next commit pass, within qwp.udp.commit.interval (2 s by default), and the next datagram then creates the table again under the old name. Confirmed with a throwaway UDP test run at questdb head and base.

The reconnect arm of CursorWebSocketSendLoop declared the flag that
routes an unconfirmed owned_by on an ORPHAN loop to the capability-gap
settle budget as ownedByCapabilityGap. The project names boolean
variables with an is or has prefix, so the local is now
isOwnedByCapabilityGap. Nothing else changes.
@glasstiger

Copy link
Copy Markdown
Contributor Author

Review: questdb/questdb-enterprise#1572 + questdb/questdb#8504 + #130

Tandem review at level 3 of questdb-enterprise f1d22d1b5 (base 674bad8f5), questdb 0b70f1eb35 (base cd59643d07) and java-questdb-client 231d364c (base 0f6c100c).

Verdict: approve for questdb/questdb-enterprise#1572, questdb/questdb#8504 and #130. There are no Critical, Moderate or Minor findings, and the test gate passes.

Titles and descriptions

  • All three titles follow Conventional Commits and describe what users can now do.
  • The questdb description flags the Enterprise breaking change (external users who name no owner can no longer auto-create over QWP). The questdb-enterprise description explains the new refusal but doesn't call it breaking.

Critical

None.

Moderate

None.

Minor

None.

Coverage

The test gate passes, with no coverage gaps worth reporting.

I ran the owner-related test classes locally at the reviewed revisions and all passed: 161 Enterprise tests and 19 OSS tests. Classes run:

  • Enterprise: QwpWebSocketOidcTest, QwpWebSocketAclTest, AclDisabledTest, AdminSecurityContextTest, EntSecurityContextBaseTest, DispatchingSecurityContextProxyTest, DispatchingSecurityContextCoverageTest.
  • OSS: QwpTudCacheAutoCreateOwnerTest, QwpColumnAutoCreateOwnerTest, QwpOwnedByE2ETest, QwpIngressReadOnlyRefusalShapeTest.

In that run, the OIDC concurrent-create test did exercise the retriable "table is being created" path: it was refused three times, then the replay landed.

Summary

  • Gates: both pass. Severity is 0 Critical, 0 Moderate, 0 Minor, so nothing in the diff and nothing broken outside it.
  • Submodule provenance:
  • What I checked across all three repos:
    • Owner resolution in EntDdlListener for SQL, ILP (including the writer-thread PrincipalOnlySecurityContext), CSV import, views, mat views and live views. Nothing changes when no owner is named.
    • Security contexts:
      • Every SecurityContext/EntSecurityContext implementation, including the test mocks.
      • The HTTP security context is rebuilt per request, and shared anonymous proxies refuse an owner, so an owner can't leak between connections.
    • Role switches:
      • The order of the 421 gate and the demote/promote steps.
      • ownerAwareDelegate naming the owner again after a role round trip.
      • Read-only refusals keeping their marker on the lookup and column-add paths.
    • QWP server paths:
      • QwpTudCache / QwpWalAppender, including the commit batch, the UDP receiver, and renames racing a column add.
      • The egress processor's shared reject and 101-response helpers.
    • Client store-and-forward rules:
      • A sender that has connected before retries a refused or unconfirmed owner with no time limit.
      • Only orphan drainers quarantine a slot: at once on a 403 with a fixed credential, or after the shared capability-gap budget.
      • The initial connect reports failures to the caller.
      • The orphan drainer catches the owner mismatch before its generic upgrade-failure handler.
  • CI: green on all three PRs.
  • Intended behaviour changes worth a release note:
    • An external (OIDC) user without owned_by now gets a terminal SECURITY_ERROR before any QWP auto-create, including a new column on an existing table. These producers need client 1.3.13 and owned_by.
    • A sender configured with owned_by fails its initial connect against a server that predates the feature.
    • Over QWP/UDP, a datagram that adds a column to a table renamed under the receiver's cache is now dropped until the cache entry is evicted. Before, it landed in the renamed table.

QwpOwnedByMismatchException named the owner and the echo, but not the
endpoint that answered 101 without confirming the owner. A sender with
several addresses could not tell from build()'s error, from
Sender.health() or from an orphan drainer's .failed reason which node
lacked the feature, while QwpDurableAckMismatchException, the gap it is
modelled on, names host and port.

WebSocketClient now passes its host and port to the exception. The
exception renders them first in its message, so the 256-character cap
of the sanitized health message keeps them, and exposes them as
getHost() and getPort(), as QwpDurableAckMismatchException does.

QwpOwnedByTest pins the endpoint in the message of the direct client,
the sender's build, both mixed connect rounds and the health snapshot,
and in the getters. BackgroundDrainerDurableAckRetryTest pins the whole
quarantine reason instead of its prefix. QwpOwnedByTest's reject-reason
tests now call assertBadRequestReason instead of repeating it inline.
Only OFF-mode builds checked that the initial connect fails when the
server answers 101 without the X-QWP-Owned-By echo. SYNC and ASYNC
startup fail too, but only through the WebSocketUpgradeException
supertype: a change that let owned_by alone retry passed the whole
suite, while a SYNC build() then blocked for the reconnect budget and
an ASYNC or lazy_connect sender buffered without ever latching a
terminal.

- QwpOwnedByTest: a SYNC build fails with QwpOwnedByMismatchException
  after a single upgrade.
- CursorWebSocketSendLoopForegroundReconnectPolicyTest: owned_by joins
  auth and durable-ack in both rows of the foreground policy table. An
  ASYNC startup latches the terminal on the first rejection, and a
  sender that has connected before rides it out and delivers once the
  owner is confirmed.
testRejectReasonNullUnlessBodyIsUsable checked a Content-Length 984
bytes past the body that arrived with the headers, but not one byte
past it. A bound in WebSocketClient.extractRejectReason loosened by
one byte passed the whole class, while the reason picked up a byte
the peer never sent: stale native memory, or the byte past the
receive buffer when a response fills it. A Content-Length of 17
against the 16-byte body now pins that edge. The case fails with the
bound loosened and passes as written.

testRejectReasonSanitized now builds its 300-character body with
TestUtils.repeat() instead of a hand-written loop.
@glasstiger

Copy link
Copy Markdown
Contributor Author

Review: #130

Level 3 review of head a087027b against base 0f6c100c.

Verdict: approve. There are no Critical, Moderate or Minor findings, and the test gate passes.

PR metadata and scope

  • The title follows Conventional Commits and describes what users gain. Fixes #131 sits on its own bullet.
  • No submodule pointer moved (only the unchanged zstd submodule exists), so the whole diff is in scope.
  • OSS tandem (feat(qwp): let QWP senders choose the owner of the tables and columns they auto-create questdb#8504): linked in both directions, CI green. It pins client 7dfa6c3d, whose core/src/main is identical to this head. Its QwpOwnedByE2ETest checks the real server's echo with the owner café team+%1 and the 403 reason.
  • Enterprise tandem (questdb/questdb-enterprise#1572): linked in both directions, CI fully green including the e2e job.
  • A kill -9 python e2e tandem isn't needed, because no crash-recovery behaviour changes.

Critical

None.

Moderate

None.

Minor

None.

Coverage

The test gate passes, with no coverage gaps. What I ran:

  • Changed test classes at head: all pass (QwpOwnedByTest, WriteFailoverTest, the three BackgroundDrainer* classes, CursorWebSocketSendLoopForegroundReconnectPolicyTest, LineSenderBuilderWebSocketTest, WsSenderConfigHonoredTest, QwpQueryClientFromConfigTest).
  • Durable-ack mismatch reported as a missing primary in mixed connect rounds #131 regression test: WriteFailoverTest.testMixedSweepCapabilityGapOutranksDemotedUpgradeError fails at base with "capability gap misreported as a missing primary" and passes at head.
  • Mutations at head, one per riskiest changed line:
Mutation Result
owned_by removed from the drainer's capability-gap catch arm 6 targeted tests fail
ORPHAN routing of owned_by to capabilityGapTerminal disabled both mid-drain owned_by tests fail
non-demotion clause removed from the connectWalk epilogue testMixedRoundReportsUnconfirmedOwner fails

What I checked

  • Connect paths: every caller of the changed code, in all three initial-connect modes (OFF, SYNC, ASYNC), post-start foreground reconnects, orphan initial and mid-drain recycles, the egress QwpQueryClient, SenderPool, connection health and connection events.
  • Upgrade response handling: the client encoding matches the server's echo encoding exactly. The reject-reason read stays inside the received bytes. The epilogue's assert holds and can never suppress an exception into itself.
  • Store-and-forward rules: they all still hold:
    • a sender that has connected before retries both a missing owner echo and a refused owner (403) with no time limit;
    • only orphan drainers quarantine, and only after the shared settle budget;
    • role rejects and transport errors still reset that budget;
    • startup still reports these failures to the caller.

Behaviour changes worth a release note (all intended)

  1. Durable-ack mismatch reported as a missing primary in mixed connect rounds #131: a connect round with a plain non-421 failure (such as a proxy's 503), a capability gap and a 421 now reports the gap. Before, it reported a missing primary. As a result:

    • SYNC startup fails at once instead of retrying for reconnect_max_duration_millis;
    • ASYNC startup reports a terminal error;
    • orphan drainers count such sweeps toward the 16-sweep settle budget instead of retrying forever;
    • connection health reports OTHER instead of ROLE_REJECTED.

    Senders that have connected before still retry with no limit.

  2. Reject reasons: every rejected upgrade, on ingress and egress, can now carry [reason=…]. It comes from a plain-text body that arrived with the headers, cleaned of control characters and capped at 256 characters.

  3. Older servers: a sender with owned_by fails its first connect against a server without the feature. After it has connected once, it keeps retrying; orphan drains quarantine once the settle budget runs out.

  4. Orphan drains: a drain sends the owner of the sender that adopted the slot, just as it already uses that sender's credential, not the owner of the sender that wrote the slot.

@glasstiger

Copy link
Copy Markdown
Contributor Author

Review: questdb/questdb-enterprise#1572 + questdb/questdb#8504 + #130

Tandem review at level 3 of questdb-enterprise 7715792ef (base a4faed114), questdb 45bd17fbf (base 02c379d69) and java-questdb-client a087027b (base 0f6c100c).

The branches have since moved to questdb-enterprise 7d911ce79 and questdb c52b7b0d0. Both are merges of main / master that touch none of the PRs' files, and the PRs' own diffs are unchanged, so this review covers the current heads too.

Verdict: approve for questdb/questdb-enterprise#1572, questdb/questdb#8504 and #130. There are no Critical, Moderate or Minor findings, and both gates pass.

Critical

None.

Moderate

None.

Minor

None.

Coverage

The test gate passes, with no coverage gaps that need a fix. Every change in behaviour has a test that would fail if it regressed. That includes:

I ran the classes that test the two newest commits (questdb 3da79cad19, questdb-enterprise eaa0ae174) at the reviewed heads, and all passed:

Class Tests passed
questdb QwpIngressUpgradeProcessorOnHeadersReadyTest 40/40
questdb-enterprise EntSecurityContextBaseTest 35/35
questdb-enterprise DispatchingSecurityContextProxyTest 12/12

Summary

  • Gates: correctness passes, with no Critical finding; the test gate passes, with no coverage gaps.
  • Submodule provenance: both pointers are on feature branches, so their changes are part of this review.
  • What I checked across the three repos:
    • every caller of the changed code;
    • every security context class, in OSS, Enterprise and the test mocks;
    • that an owner never leaks between connections: HTTP builds the security context per request, and the shared anonymous proxies only get contexts that refuse an owner;
    • that who owns new tables and columns (EntDdlListener) is the same as on base when no owner is named, for SQL, ILP over TCP and HTTP, CSV import and views;
    • the order of the role check against an in-place demote or promote;
    • the QWP table cache and WAL appender on the WebSocket, commit-batch and UDP paths;
    • the helpers the egress upgrade shares with ingress.
  • Store-and-forward rules hold:
    • a sender that has already connected retries a refused or unconfirmed owner with no time limit;
    • only orphan drainers quarantine a slot, and only on the sanctioned conditions;
    • terminal errors from an orphan's connection loop never reach the user's error handler.
  • PR claims checked: the UDP tradeoff in the feat(qwp): let QWP senders choose the owner of the tables and columns they auto-create questdb#8504 description holds. When a table is renamed under a cached entry, the next commit pass evicts that entry, even with no rows buffered (TableUpdateDetails.commit(), unchanged from base), so datagrams are dropped only until that pass.
  • Behaviour changes worth a release note:
    • An external (OIDC) user that names no owner now gets a final SECURITY_ERROR before any QWP auto-create, including adding a column to an existing table. These producers need client 1.3.13 and owned_by.
    • A sender configured with owned_by fails its first connect to a server that does not support the option.
    • Orphan drainers replay the slots they adopt under the adopting sender's owned_by.
    • Over QWP UDP, rows that add a column to a table renamed under the receiver's cache are dropped until the next commit pass. Before, they landed in the renamed table.
  • Titles and descriptions: all three titles follow Conventional Commits and describe what users gain.
  • CI: java-questdb-client is green. questdb-enterprise and questdb CI was still running on the merge heads when this was posted.

@glasstiger

Copy link
Copy Markdown
Contributor Author

Review: questdb/questdb-enterprise#1572 + questdb/questdb#8504 + #130

Tandem review at level 3 of questdb-enterprise 7d911ce79 (base b7a642a59), questdb c52b7b0d0 (base 5cc1777f0) and java-questdb-client a087027b (base 0f6c100c).

Verdict: approve for questdb/questdb-enterprise#1572, questdb/questdb#8504 and #130. There are no Critical, Moderate or Minor findings, and both gates pass.

Critical

None.

Moderate

None.

Minor

None.

Coverage

The test gate passes, with no coverage gaps. Every changed behaviour has a test whose assertion would fail if it regressed:

None of the added test lines use assertSql(...) or .returnsOnce(...).

Summary

  • Gates: correctness passes, with no Critical finding; the test gate passes. Severity: 0 Critical, 0 Moderate, 0 Minor.
  • Submodule provenance: both pointers are on feature branches, so their changes are part of this review.
  • What I checked across the three repos:
    • who owns new tables and columns is unchanged when no owner is named: SQL, ILP over TCP and HTTP, CSV import and mat views, under the built-in admin, assumed service accounts and the identity-less contexts;
    • an owner never leaks between connections: every Enterprise security context class, including the test mocks. HTTP builds the context per request, and the shared anonymous proxies only wrap contexts that refuse an owner;
    • the QWP server: the owner check against concurrent CREATE, DROP, RENAME and REBASE, the column-add catch-up, the UDP receiver, the reject helpers the egress endpoint shares, and in-place demote and promote;
    • the client's store-and-forward rules: a sender that has connected keeps retrying an unconfirmed or refused owner with no time limit, orphan drainers quarantine only on the sanctioned conditions, and role rejects and transport errors never use up the capability-gap budget.
  • PR metadata: all three titles follow Conventional Commits. The questdb body puts Fixes #8546 on its own bullet, as questdb/CLAUDE.md asks. Both referenced issues exist and match.
  • CI:

Behaviour changes worth a release note (all intended, and the PRs document them):

  • An external (OIDC) user that names no owner now gets a final SECURITY_ERROR before any QWP auto-create, including a new column on an existing table. Before, such a column was created but got no owner. These producers need client 1.3.13 and owned_by.
  • A sender configured with owned_by fails its first connect to a server without the feature.
  • Over QWP/UDP, a datagram that adds a column to a table renamed under the receiver's cache is dropped until the next commit pass (2 s by default). Before, it landed in the renamed table. The commit pass does evict that entry even with no rows buffered: TableUpdateDetails.commit() marks the writer in error once the cached name no longer resolves.
  • Orphan drainers replay the slots they adopt under the adopting sender's owned_by.
  • A connect round that meets a 503, then a primary missing a capability, then a replica's 421 now reports the missing capability (Durable-ack mismatch reported as a missing primary in mixed connect rounds #131). Orphan drainers in that situation are now held to the settle budget instead of retrying without limit.

@mtopolnik

Copy link
Copy Markdown
Contributor

[PR Coverage check]

😍 pass : 135 / 136 (99.26%)

file detail

path covered line new line coverage
🔵 io/questdb/client/Sender.java 16 17 94.12%
🔵 io/questdb/client/cutlass/qwp/client/sf/cursor/BackgroundDrainer.java 40 40 100.00%
🔵 io/questdb/client/cutlass/http/client/WebSocketClient.java 44 44 100.00%
🔵 io/questdb/client/cutlass/qwp/client/QwpAuthFailedException.java 6 6 100.00%
🔵 io/questdb/client/cutlass/qwp/client/QwpOwnedByMismatchException.java 9 9 100.00%
🔵 io/questdb/client/impl/ConfigSchema.java 1 1 100.00%
🔵 io/questdb/client/cutlass/qwp/client/QwpWebSocketSender.java 12 12 100.00%
🔵 io/questdb/client/cutlass/qwp/client/sf/cursor/CursorWebSocketSendLoop.java 6 6 100.00%
🔵 io/questdb/client/cutlass/qwp/client/QwpUpgradeFailures.java 1 1 100.00%

@glasstiger

Copy link
Copy Markdown
Contributor Author

Review: questdb/questdb-enterprise#1572 + questdb/questdb#8504 + #130

Tandem review at level 3, at these revisions:

Repo Head Base
questdb-enterprise 4d5217d6b a07be2bd6
questdb 57839eafa4 967f9453
java-questdb-client a8759195 58e556ff

Verdict: approve for questdb/questdb-enterprise#1572, questdb/questdb#8504 and #130. There are no Critical, Moderate or Minor findings, and the test gate passes.

Titles and descriptions

  • All three titles follow Conventional Commits and say what users gain.
  • The questdb body puts Fixes #8546 on its own bullet, and the client body has Fixes #131. Both issues exist and match what the PRs fix.
  • The enterprise body describes the breaking change for external (OIDC) users.

Critical

None.

Moderate

None.

Minor

None.

Coverage

The test gate passes with no coverage gaps. No added test line uses assertSql(...), TestUtils.assertSql(...), plan helpers or .returnsOnce(...).

Summary

  • Gates: both pass. There are no findings in the diff and none breaking code outside it.
  • Submodule provenance:
  • What the caller analysis covered (by reading the code across the three repos and the test mocks):
    • Owner rules: they match SQL OWNED BY for local users, external users, the built-in admin and assumed service accounts.
      • Every Enterprise security context overrides both new methods.
      • Pooled anonymous proxies can't store an owner.
      • HTTP builds the context per request, so an owner can't leak between connections.
    • Who owns new objects: EntDdlListener gives the same owner as base when no owner is named. That holds for SQL, ILP over TCP and HTTP (including the writer-thread contexts), CSV import, views, mat views and live views.
    • QWP server:
      • The 421 role check runs before the owner check.
      • The 400, 403 and 421 responses are sized before they are written.
      • The server's echo encoding matches the client's.
      • Auto-create was checked on the WebSocket per-frame and commit-batch paths and on UDP, including concurrent CREATE, DROP, RENAME and REBASE.
      • After a rename away and back, the next lookup drops the cached entry as stale before the new rebound check runs, so it is not wrongly refused.
    • Store-and-forward client rules:
      • A sender that has connected retries a refused or unconfirmed owner with no time limit.
      • The initial connect reports failures to the caller.
      • Orphan drainers quarantine a slot only on the allowed conditions.
      • Transient errors don't use up the capability-gap budget.
  • Behaviour changes worth a release note (intended, and documented in the PRs):
    • An external (OIDC) user that names no owner now gets a final SECURITY_ERROR before any QWP auto-create, including a new column on an existing table. These producers need client 1.3.13 and owned_by.
    • A sender configured with owned_by fails its initial connect to a server without the feature: 403 on open source, no echo on older servers.
    • Orphan drainers replay the slots they adopt under the adopting sender's owned_by, just as they already use its credential.
    • Over QWP/UDP, datagrams that add a column to a table renamed under the receiver's cache are dropped until the next commit pass.
  • Since the last review round: each PR's own diff is byte-identical to the previously reviewed heads (7d911ce79 and c52b7b0d0). Only the merges of main/master moved, and they touch none of the PR files.
  • CI, when this was posted:
    • questdb-enterprise: no failures so far. The storage-replication, "other" and S3/GCS replication jobs are still running; "check oss is mergeable" passes.
    • questdb: no failures so far. Three Griffin jobs are still running.
    • java-questdb-client: green.

@kafka1991
kafka1991 self-requested a review November 27, 2026 14:03

@kafka1991 kafka1991 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed PR #130 at level 3, the full review. Verdict: approve. There are no Critical or Moderate findings, one Minor doc nit, and the test gate passes.

Revisions: head a8759195, base and merge-base 58e556ff.

Title and description

  • The title follows Conventional Commits and the description explains the user impact.
  • Labels (security, tandem, QWP, READY) fit the scope.
  • Fixes #131 sits inside a bullet rather than at the top of the body. GitHub still links it as a closing issue, so this doesn't block anything.

Submodule provenance

No submodule pointer moved and no binary files are committed.

Tandem PRs

  • questdb/questdb#8504 and questdb/questdb-enterprise#1572 both exist on the matching branch ia_qwp_owned_by, and all three PR descriptions link to each other.
  • The OSS branch pins the client at a8759195, so OSS CI runs this exact client code.
  • OSS end-to-end tests (QwpOwnedByE2ETest) cover, against a real server:
    • the server echo and the owner recorded on auto-created tables and columns;
    • the 403 refusal and its reason.
  • Enterprise ACL and OIDC tests cover the HA and ACL side.

Critical

None.

Moderate

None.

Minor

README describes owned_by as a group only

  • Problem: the README placeholder suggests owned_by must name a group.
  • Net impact: readers may think a user or service account cannot be named.
  • Evidence: at a8759195, README.md:737-739 says "owned_by=<group> … grants them to that group". The LineSenderBuilder.ownedBy javadoc (Sender.java:2561-2568) says "user, group or service account", and that a principal may name itself.
  • Fix: use owned_by=<owner> and "grants them to that user, group or service account". Keep the existing note that an external user must name one of its groups.

Coverage

  • Test gate: passes, with no coverage gaps admitted.
  • #131 fix, checked by running the tests: in a scratch worktree on JDK 25, the regression tests pass at head and fail once the fix is removed.
    • The tests are WriteFailoverTest.testMixedSweepCapabilityGapOutranksDemotedUpgradeError and QwpOwnedByTest.testMixedRoundReportsUnconfirmedOwnerAfterPlainUpgradeFailure.
    • I ran them with the native library taken from the local 1.3.13-SNAPSHOT jar, since this PR changes no native code.
    • At head: green (18/18 in QwpOwnedByTest, 2/2 in WriteFailoverTest).
    • With the new capabilityGapError block in connectWalk removed: both fail with QwpRoleMismatchException, which is the #131 symptom.
  • CI: green, including JDK 8, the JDK 25/26 compile smoke jobs and Windows/Mac/Linux on Azure.

Behaviour changes worth knowing (intended, not defects)

  1. Store-and-forward and pool startup rules hold for owned_by:
    • A sender that has already connected retries a missing owner echo with no time limit and keeps buffering rows.
    • SYNC and OFF startup report the failure from build(); ASYNC startup latches it as a terminal error.
    • Orphan drainers get the same settle budget as a missing durable-ack echo, and only that gap counts against it. Role rejects and transport errors still reset the budget.
  2. #131 changes outcomes in one kind of mixed round: a plain non-421 failure, then a capability gap, then a 421 now reports the gap.
    • SYNC startup fails at once instead of retrying within its budget.
    • An orphan drainer now spends the settle budget and then writes .failed, instead of retrying forever.
    • This makes the result independent of endpoint order: base already behaved this way when the gap came first.
  3. Without a 421 in the round, the order still decides the error: [503, gap] reports the 503, and an orphan drainer quarantines that slot immediately. [gap, 503] reports the gap. Base does the same for durable ack.
  4. Orphan drainers replay adopted slots under the adopting sender's owned_by, the same way they already use its credential. The PR documents this.
  5. Rejected upgrades now show the response body: a sanitized text/plain body (at most 256 characters) is appended to the error message, on the query client too.

Summary

  • Correctness gate: passes. Every upgrade-error catch site and the drainer recycle path were traced, and every outcome change is either intended or the same as base.
  • Hot path: the new allocations happen per connect attempt only. No per-row code changed.
  • Java 8: no APIs newer than Java 8.
  • Findings: 0 Critical / 0 Moderate / 1 Minor, all inside the diff.

@kafka1991 kafka1991 added the QUEUED FOR MERGE Approved PR in the merge queue. Do not merge master into this PR. label Nov 30, 2026
@glasstiger
glasstiger merged commit 91b3a8a into main Nov 30, 2026
22 checks passed
@glasstiger
glasstiger deleted the ia_qwp_owned_by branch November 30, 2026 17:33
glasstiger added a commit to questdb/questdb that referenced this pull request Dec 1, 2026
Bump java-questdb-client to the commit that adds the
designatedTimestamp query option (questdb/java-questdb-client#135),
and check the designated timestamp through it, as changes to the QWP
wire format require.

- QwpEgressQueryDetailsClientTest compares the index the pinned client
  reports with /exec across table scans, projections, a TIMESTAMP_NS
  table, SAMPLE BY, an ASOF JOIN and an empty result, with and without
  a row window, and checks that it names a TIMESTAMP or TIMESTAMP_NS
  column of the schema the client decoded. It also covers the pooled
  Query facade, statements and errors, and that the client and server
  constants match.
- QwpEgressFuzzTest asks for the designated timestamp a third of the
  time, and checks it against /exec in both of its query paths.

The bump also brings in questdb/java-questdb-client#130, which adds
owned_by to the QWP sender.
glasstiger added a commit to questdb/nodejs-questdb-client that referenced this pull request Dec 1, 2026
…-creates (#82)

* feat(qwp): add owned_by to name the owner of the tables a sender auto-creates

QWP ingestion auto-creates the tables and columns a sender writes, and
QuestDB Enterprise grants their creator the owner permissions on them. An
external (OIDC) user cannot hold permissions, so it could not auto-create
anything over QWP. SQL solves this with OWNED BY. The owned_by connect-string
key and the ownedBy ingress option are the QWP equivalent, as in the Java
client (questdb/java-questdb-client#130).

- Node.js sends the owner as X-QWP-Owned-By, percent-encoded UTF-8 in the
  canonical form the server echoes, on every /write/v4 upgrade: reconnects,
  failovers and orphan drains included. Query sessions never send it, and
  the connect strings of the other transports reject the key.
- The upgrade fails with the new QwpOwnedByMismatchError, exported from the
  Node.js package, unless the server echoes the owner: a server that predates
  the header ignores it, and the tables it creates would not get the owner.
- That failure is a capability gap, handled like a durable ACK the server
  does not confirm: a blocking startup fails at once, background replay
  retries it, and an orphan drainer counts it toward the budget a missing
  durable ACK draws on, then quarantines the slot.
- A rejected upgrade carries the text/plain body that arrived with its
  headers as QwpUpgradeError.reason, sanitized and capped at 256 characters,
  and appends it to the message, so a refused owner (403) reads
  "[reason=owned_by refused: ...]" instead of looking like a rejected
  credential.
- The browser client sends the owner in the qwp_owned_by URL parameter. A
  browser cannot read the upgrade response, so it cannot confirm the owner,
  as the option's documentation says.

Documents the option in QWP.md and the READMEs, and regenerates the API
reference.

* fix(qwp): reject an owned_by header conflict when the sender is created

ownedBy combined with an X-QWP-Owned-By header in the headers escape hatch
was rejected only by the first connection attempt, while a blank owner, or
one with a lone surrogate, already failed when the sender or client was
created. createQwpNodeSender() and the pooled client's option normalization
now reject the conflict as well, against the headers ingress ends up with,
so Sender.fromConfig(), new Sender(), createQwpNodeClient() and
parseQwpNodeClientConfig() report it up front. The raw connector keeps its
connect-time check, and both apply one rule.

A Sender's invalid typed ownedBy is reported as qwp.webSocket.ownedBy, the
option its caller wrote, rather than as the pooled client's ingress.ownedBy.

The display-text test now covers U+2029, the one character class of the
sanitizer that no test exercised.

* fix(qwp): honor the current sender owner and bound upgrade diagnostics

Resolve ownedBy and raw headers at Sender construction so later overrides cannot leave a stale upgrade header. Only read a bounded prefix of complete, uncompressed text/plain upgrade rejections.

Document orphan adoption, browser fallback, and reconnect event semantics. Exercise owner changes and replay on the wire, and drain notifications before asserting their absence.

* fix(qwp): isolate sender credentials and pin replay ownership

Snapshot headers per parsed configuration and honor getter-backed owners on Node and browser ingress. Keep the chosen owner across lazy connects, failover, foreground replay, and orphan adoption.

Report the final capability gap separately from the orphan retry budget and decode bounded upgrade refusal text using its declared charset. Cover these paths with transport and replay regressions.

* docs(qwp): align factory docs, durable-ack-unavailable counts and a test name with the code

The senders no longer call connectQwpNodeIngress(), connectQwpBrowserIngress()
or createQwpBrowserConnectionFactory(): they capture ownedBy once, when they are
created. Describe those functions as the test entry points they are, and put the
auth-validation comment in createQwpBrowserSender() back above its call.

durable-ack-unavailable events count the whole capability-gap episode, owner gaps
included. Say so for that event and for QwpReconnectEvent.attempt, as the
durable-ack-persistent-failure docs already did.

Name the rejected-upgrade copy test after what it checks: it decodes at most
4,096 bytes and catches only a concat-based copy.

Regenerates the API reference.

* docs(qwp): say that connect-string Senders copy their typed headers

A Sender built from a ws/wss connect string copies qwp.webSocket.headers
when its SenderOptions is created and again when the Sender is built, so
edits to that object no longer reach it, reconnects included, and it reads
headers and ownedBy from the qwp section it is given. The caller's object
used to be read on every connection attempt. Say so in QWP.md and on
QwpExtraOptions.webSocket, and pin both copies and the section read in
tests.

The content-coded rejection test now declares charset=iso-8859-1, which
decodes any byte sequence, so it fails without the Content-Encoding check.
Under UTF-8, gzip's magic number failed to decode with or without it.

Regenerates the API reference.

* test(qwp): cover sweeps where every endpoint lacks a capability, and the pooled drainer's owner

No test fed the reconnect loop a sweep in which every endpoint completed
the upgrade without a capability the session asked for. Disabling its
handling of such a sweep left every test passing, while a blocking
store-and-forward startup then retried for its whole budget and an orphan
slot was never quarantined. Cover it with synthetic sweeps of owner gaps,
and of an owner gap followed by a durable-ACK gap, and run the blocking
startup test against two real endpoints that both ignore the owner.

The pooled client's orphan drainer was untested as well: passing it no
owner left every test passing, while a recovered slot then replayed
without X-QWP-Owned-By. Drain a slot a pooled sender left behind and check
that the recovery upgrade names the pool's owner.

* test(qwp): check that a sender's orphan drainer keeps its bound owner

createQwpNodeSender() binds ownedBy when the sender is created, so that
lazy startup, foreground replay and orphan adoption all use the same
owner. Only the first two were tested. The orphan-drain test adopted
through connectQwpNodeIngress(), where the live and the bound owner are
the same value, so a drainer that read options.ownedBy again left every
test passing while it replayed adopted slots under an owner the sender
was not created with.

Run that test through a sender whose options change after it is created
as well.

* fix(qwp): name the owner option the caller wrote in the header-conflict error

The error for an owner that an X-QWP-Owned-By header also names always
called the option 'ownedBy'. A Sender or pooled client that takes its owner
from the connect string now reports 'owned_by', and typed owners report
'qwp.webSocket.ownedBy' or 'ingress.ownedBy', as the other owner errors on
those paths already do. createQwpNodeSender() and the raw connector keep
'ownedBy'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

QUEUED FOR MERGE Approved PR in the merge queue. Do not merge master into this PR. QWP READY security tandem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Durable-ack mismatch reported as a missing primary in mixed connect rounds

3 participants