Skip to content

enhance: wait for collection readiness via notifications - #36

Merged
sunby merged 1 commit into
codex/load-1m-segments-pr-stack-rebased-qv-workfrom
codex/collection-ready-wait-pr
Sep 14, 2026
Merged

enhance: wait for collection readiness via notifications#36
sunby merged 1 commit into
codex/load-1m-segments-pr-stack-rebased-qv-workfrom
codex/collection-ready-wait-pr

Conversation

@sunby

@sunby sunby commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Automatic DQL readiness polls ShowLoadCollections every 10 ms while a collection loads, with separate loops for concurrent requests. Replace those loops with a WaitCollectionReady RPC signaled by committed load-config changes and shard-state updates. Share load submission and readiness waiting per collection on each Proxy, including requests that already observe Loading, while retaining the direct DQL loading path from #15.

The RPC checks every expected vchannel/replica pair. Subscribing before reading state prevents missed notifications; release invalidates existing subscriptions, and cancellation, load timeout and runtime shutdown end the RPC. Notification state is retained only for active waiters. Initial per-request readiness checks and explicit load-progress APIs remain available.

Related: #16 and #25. Issue tracking is disabled for this fork.
Design: Collection Readiness.

Upgrade MixCoord before Proxy: older coordinators do not implement the new RPC, and there is no polling fallback. The synchronous warmup policy in draft #17 remains separate from this PR.

Validation

Validated on base 7050f6f80e with -tags dynamic,test -gcflags="all=-N -l" and the installed native libraries:

  • 35 selected QueryCoord, Proxy, notification, load-config and shard-registry tests passed with -race -count=3, including real StreamingNode Up callbacks, gRPC deadlines/status, release, cancellation during a blocked catalog write, shared waits and automatic-load/requery queue regressions.
  • All 153 tests in the notification, load-config and shard-registry packages passed.
  • MixCoord service/client, coordinator and DataCoord packages passed compile-only checks.
  • Lint restricted to this diff: 0 issues; git diff --check passed.
  • run_clang_format.sh passed with clang-format 15.0.7.
  • make lint-fix ran gofumpt/gci, then failed on the unchanged internal/metastore/kv/querycoord/kv_catalog_test.go:372: undefined: mocks; pkg/client lint stages were not reached. Unrelated formatter changes were excluded.

Production CPU/allocation savings and mixed-version rollout have not been measured.

Signed-off-by: sunby <sunbingyi1992@gmail.com>
@sunby
sunby merged commit 86b1671 into codex/load-1m-segments-pr-stack-rebased-qv-work Sep 14, 2026
10 of 13 checks passed
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