Skip to content

fix: avoid empty streaming query shards - #34

Open
sunby wants to merge 1 commit into
codex/load-1m-segments-pr-stack-rebased-qv-workfrom
fix-sn-empty-shard
Open

fix: avoid empty streaming query shards#34
sunby wants to merge 1 commit into
codex/load-1m-segments-pr-stack-rebased-qv-workfrom
fix-sn-empty-shard

Conversation

@sunby

@sunby sunby commented Sep 14, 2026

Copy link
Copy Markdown
Owner

After an SN restarts before persisting a Ready view as Up, a delayed Up/Dropped push can register an empty shard. Vchannel-only query planning may then return VIEW_NOT_FOUND even though a replacement replica has an Up view.

Create missing shards only for batches containing Preparing; otherwise report the lost view without indexing a shard. For unknown replica IDs, try the other vchannel candidates when a candidate has no Up view. Preserve explicit-replica lookup, context errors, query leases, and draining of accepted reports during WAL handoff.

Validation:

  • The full snview suite passed with -race -tags dynamic,test -gcflags="all=-N -l" -count=1 on the target base; nine related QueryPlan/adaptor/client tests and the dynamic package build also passed.
  • Regression coverage includes Ready-state loss and replacement, mixed batches, fixed-order unavailable candidates, cancellation, lease release, and concurrent handoff. The old implementation and both fallback/drain mutations triggered the expected regression failures.
  • Targeted golangci-lint reported zero issues; formatter checks, run_clang_format.sh with clang-format 15, and git diff --check passed.
  • make lint-fix was run but stopped at the existing internal/metastore/kv/querycoord/kv_catalog_test.go:372: undefined: mocks typecheck error. Unrelated formatter changes were restored. No cluster deployment was performed.

Related: #16.

issue: milvus-io#40451

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