Skip to content

feat: add gated synchronous LoadCollection warmup - #17

Draft
sunby wants to merge 2 commits into
codex/load-1m-segments-pr-stack-rebased-qv-workfrom
codex/load-collection-force-sync-warmup
Draft

feat: add gated synchronous LoadCollection warmup#17
sunby wants to merge 2 commits into
codex/load-1m-segments-pr-stack-rebased-qv-workfrom
codex/load-collection-force-sync-warmup

Conversation

@sunby

@sunby sunby commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Summary

Add an opt-in LoadCollection parameter, load_params["warmup"]="sync", with Go SDK WithSyncWarmup() and REST V2 forwarding. Omission keeps existing behavior. Explicit sync rejects refresh, external collections, and in-place enablement on an ordinarily loaded/loading collection; release first.

Persist a separate sync-warmup policy and durable epoch until ReleaseCollection, carry them through load configuration, WAL, query views and segment load information, and qualify physical/transform-loaded fast paths by the successful load epoch. Add stale-view/config-version guards and target-based vchannel × replica progress accounting.

Wire the native force flag into selected field/index/text/JSON-stat/system-field warmup paths, including both outer and inner index warmup settings. This does not change global warmup, lazy or mmap settings, expand selected load fields, or provide a cache-residency guarantee.

Context propagation is unchanged from the PR base. Reuse the existing JsonKeyStats::Load, column-group/helper signatures and cache-slot call sites; force sync uses the existing synchronous execution mechanism. Task-level checks that reject canceled load/update completions remain. Extending native context propagation or prompt I/O cancellation is a separate follow-up, not part of this feature.

Rollout boundary

Draft: native and end-to-end acceptance are still pending. queryCoord.enableLoadCollectionSyncWarmup remains false by default. Admission and placement check QueryNode/native capabilities. A full compatible Proxy/WAL rollout is a manual prerequisite; the QueryNode capability check does not detect every older upstream component. Do not enable the gate based on these unit tests alone.

Scope and references

Verification

Checks rerun for the context-scope reduction (b2b2c34392):

  • Source diff audit: JsonKeyStats.cpp/.h, ChunkedColumnGroup.h and ChunkedSegmentSealedImpl.h now exactly match the PR base. ChunkedSegmentSealedImpl.cpp keeps only three force-policy hunks; no newly added native context forwarding remains.
  • ChunkedSegmentSealedImpl.cpp and JsonKeyStats.cpp passed -fsyntax-only using the current LLVM 21 compile commands, with PCH disabled and OpenMP retained. This is a syntax/signature check, not a full native build or test run.
  • run_clang_format.sh passed with clang-format 15.0.7 in an isolated worktree. Changed-line formatting was also checked. Unrelated baseline formatting is excluded.
  • make lint-fix ran gofumpt/gci, then failed in root-module type checking: internal/metastore/kv/querycoord/kv_catalog_test.go:372: undefined: mocks. The same reference exists in the base commit and this file is unchanged by the feature. The target did not reach its pkg/client lint stages; full-repository lint is not green.
  • git diff --check passed.

Go checks from the previous submission (not rerun for this native-only scope adjustment):

  • Full package tests passed for internal/views/coord/loadmgr, internal/views/coord/balancer, internal/views/coord/coordview and internal/views/qviews/....
  • Go SDK TestLoadCollectionSyncWarmupOption passed.
  • Targeted QueryCoord sync-policy, fail-closed capability and complete-target progress tests passed; the session capability round-trip and isolated default-off gate tests also passed.
  • All Go tests above used -tags dynamic,test -gcflags="all=-N -l" -count=1.

Earlier implementation checks and their exact scope are recorded in design appendix B: targeted QueryCoord policy/capability/progress, session capability, default-off configuration, proto and selected native compilation checks. They are not full native/E2E acceptance.

Known gaps / adversarial review

  • QN/Proxy/REST test execution is blocked by stale installed native artifacts and missing current native symbols. Their new tests are written, not passed.
  • The earlier full milvus_core build attempt encountered Knowhere/LLVM 18/libc++ std::atomic_ref incompatibility, and the chunked-segment build encountered an OpenMP structured-binding capture limitation. The current LLVM 21 syntax checks above pass with OpenMP retained; a full native build/test run was not repeated in this scope-reduction update.
  • Full QueryCoord regression is not green: TestServer/TestStop reproduced a repeated-close panic; TestServer/TestUpdateAutoBalanceConfigLoop reproduced an etcd session CAS conflict during setup. Full paramtable tests also encounter local-config default overrides.
  • Real Storage V1/V2/V3 I/O barriers, nested Knowhere, text/JSON stats, recovery/migration and concurrent release/reload remain unverified end to end.
  • S3 throttling, corruption, OOM, cancellation/timeout, nested-pool/peak-memory behavior and failure-code/retry propagation still need real fault injection. Cancellation tests must verify rejection of late results through the existing cancellation paths; expanding context propagation to promptly interrupt every metadata/file read is outside this feature.
  • Full make test-go has not been run for this feature. Keep the gate closed until the acceptance matrix is completed.

Native and end-to-end validation remain pending.

Signed-off-by: sunby <sunbingyi1992@gmail.com>
Signed-off-by: sunby <sunbingyi1992@gmail.com>
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