enhance: add event-driven stats discovery - #20
Merged
sunby merged 1 commit intoSep 8, 2026
Merged
Conversation
Signed-off-by: sunby <sunbingyi1992@gmail.com>
sunby
marked this pull request as ready for review
September 8, 2026 12:49
sunby
merged commit Sep 8, 2026
daae67c
into
codex/load-1m-segments-pr-stack-rebased-qv-work
10 of 13 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add opt-in event-driven discovery for DataCoord TextIndexJob and JsonKeyIndexJob. Metadata publication records bounded dirty keys; the inspector rechecks current metadata before submission. Keep the existing task format, eligibility rules, scheduler/worker retries and cleanup behavior.
Only two public startup-level settings are added:
pollremains the default.shadowkeeps legacy submission and makes the new path read-only.eventreplaces periodic legacy discovery with events plus bounded reconciliation. IndexInspector, Load/Search, WAL protocols, Sort/BM25 scheduling and unrelated GC optimizations are outside this PR.Base and references
sunby/milvus:codex/load-1m-segments-pr-stack-rebased-qv-workat7e32a5ca9b7e472f1563668e497595a1f57b0d7d. Only the StatsInspector patch is replayed on this squashed base; no already-merged stack changes are included.Verification
Rerun on the submission base:
-race -tags dynamic,test -gcflags="all=-N -l" -count=3(16.039 seconds). Coverage includes overflow, missed notifications, in-flight generations, capacity/allocator/persistence/resource failures, schema/config changes, cleanup, compaction variants, cancellation and persisted-before-enqueue recovery.run_clang_format.shcompleted using clang-format 15.0.7 in an isolated verification worktree. No C/C++ changes or unrelated formatting changes are included in this PR.make lint-fixran gofumpt/gci, then failed root-module type checking atinternal/metastore/kv/querycoord/kv_catalog_test.go:372: undefined: mocks. This file has the same blob in the base and head; pkg/client stages were not reached. Unrelated auto-format changes are excluded. The pinned gci version misclassifies the standard-libraryiterpackage; the committed import grouping passes the current changed-code lint.git diff --checkpassed.Earlier same-build local microbenchmarks at 100,000 unchanged segments measured 10,624,400 B per legacy discovery pass versus 0 B for an empty event-consumer pass. Starting a streaming cursor, reading its first entry and stopping used 232 B. These measure local allocation paths, not whole-process allocation or online GC/search latency improvement.
Remaining validation / adversarial review
Draft: keep the default poll mode until acceptance is complete.
make test-gowas not run; production-build end-to-end acceptance remains pending. Source-traced producer coverage and the targeted failure tests above do not replace all import/restore/worker/storage fault-injection tests.