Skip to content

Reuse private transports across fresh coordination proofs - #1059

Open
zlareb1 wants to merge 9 commits into
mainfrom
fix/ch-coordination-channel-reuse
Open

zlareb1 wants to merge 9 commits into
mainfrom
fix/ch-coordination-channel-reuse

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Related: #1076

Depends on: #1062

Changelog category (leave one):

  • Improvement

Changelog entry

Coordination proofs reuse one idle private transport per client while keeping fresh named sessions and live authority checks.

Why

Constructing a private transport for every proof repeats driver initialization and server metadata reads. Retaining one idle transport avoids that repeated construction. Each proof still creates a separate named session and bootstrap; transport reuse retains no authority result.

Scope and risk

The branch includes the separately reviewed pagination-focus dependency above so the combined source receives CI. That dependency must qualify and merge before this PR; the transport change itself remains three files.

The client retains at most one idle channel bound to its original driver, generation and connection configuration. Concurrent proofs own distinct transports. Failed, poisoned, cancelled, replaced and nonquiescent scopes discard their channels. Disconnect closes idle state and refuses new proofs while an active scope finishes.

Live backend, principal, Keeper, table and nonce checks retain their existing behavior. Statement and proof deadlines, admission capacity, query retries and cache settings retain their existing limits. No measured latency benefit or native acceptance result is established by the unit tests.

Compatibility, rollout and rollback

  • Wire: none.
  • Operator steps: none.
  • Rollback: reverting restores transport construction per proof; no stored data or schema changes.

Tests

  • Before implementation, hosted regression tests produced the predicted four failures and 20 passing controls in the affected module. The shard reported four failures and 6,520 passing cases: https://github.com/ClickHouse/loom/actions/runs/44768432667/job/136400992592.
  • Ruff lint and formatting checks pass for all three changed files. The guarded lint run passed.
  • Earlier local test attempts were refused by the shared test supervisor; they establish no test result. The current-main composition attempt was also refused before tests launched; hosted CI provides execution validation for that composition.
  • The published transport implementation passed all 31 session and 15 transport cases in hosted CI. Additional controls cover refusal disposal, cancelled bootstrap, disconnect during an active proof, and service-principal isolation after reuse.
  • The pagination dependency passed 3,706 frontend cases and all three browser shards, with 623 passing and 15 skipped browser tests. Its stopped local post-fix run remains incomplete.
  • The preceding combined head passed Cell acceptance with a 3.51 ms median p99 delta; integration shard 4 failed because its replicated-erasure fixture omitted the lease table. The branch composes the fixture repair merged in the related PR below. Full CI and Cell acceptance must pass on this composition; earlier results remain scoped to their original head.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated: Codex wrote the change; independent source review checked ownership, cancellation, identity pins and the unchanged native proof.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Required CI and native acceptance pass on the final implementation.
  • No generated surfaces, migrations, settings or plugin changes. The frontend dependency is disclosed above.
  • No operator steps or wire changes.
  • Commits are signed off.

Specify fresh proof sessions, private transport ownership and failure disposal before implementing bounded reuse.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Nov 20, 2026 11:35pm UTC

Request Review

Keep one idle channel per client while rebuilding each checked session and discarding failed, replaced or active-child transports.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@zlareb1 zlareb1 changed the title Cover coordination transport reuse boundaries Reuse private transports across fresh coordination proofs Nov 20, 2026
@zlareb1
zlareb1 marked this pull request as ready for review November 20, 2026 16:24
@zlareb1 zlareb1 mentioned this pull request Nov 20, 2026
7 tasks done
A pending passive effect can clear a request before its loading state commits. Hand focus over in a layout effect and reproduce the lost request before passive effects flush.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>

This branch has not been deployed

No deployments
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