Repository navigation
[4.2-dev] [Bug] Avoid fulltext2 posting materialization for live DF - #32850
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
This pull request is merged. |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: a44c418aa644c4a77c5e6d06187ce973f18e07ce
Assessment: approve
Live-DF counting preserves existing liveness and query-cache semantics, reusing raw counts and block decoding without new shared state. The scoped allocation benefit is validated; no blocking correctness or design defects remain.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Isolation preflight passed. Go 1.26.4 and reused native artifacts were verified against current inputs.
-
Ten focused test roots passed. The fulltext2 package tree passed across seven packages: 307 roots, 359 tests/subtests, zero skips.
-
Package listing, build and vet passed.
-
32 benchmark variants × three repetitions completed. Loaded dirty DF=200,000/eight terms: median 4.92ms versus 6.36ms, and 0 versus 12,845,056 B/op against the prior-algorithm oracle.
-
Receipts and logs reconciled in validation-summary.json; all three discussion keys assessed; source unchanged.
Limitations:
-
The added SQL smoke uses classic FULLTEXT and does not exercise this FULLTEXT2 helper. Existing FULLTEXT2 fixtures were reviewed, and loaded-index scoring oracles passed.
-
Distributed SQL BVT and issue #28846 sustained NQFT latency acceptance were not run. Helper benchmarks do not establish an end-to-end latency fix.
What type of PR is this?
Which issue(s) this PR fixes:
issue #28846
What this PR does / why we need it:
globalStats.dfcurrently expands each loaded term's compressed posting list into a full docID slice before applying segment liveness. This change returns the raw posting DF for fully-live segments and counts live docIDs block by block with fixed-size scratch space for dirty segments. It preserves the live-document DF, query-level cache, and search results while avoiding full-list materialization.Non-goals:
Validation:
TestLiveTermDF*andTestGlobalStatsDF*viamo-cgo-test— PASS ata44c418aa644c4a77c5e6d06187ce973f18e07ce../pkg/fulltext2/...— PASS at the same head.go vet ./pkg/fulltext2/...with repository CGo include/link flags — PASS.test/distributed/cases/fulltext/fulltext_plugin_smoke.sqlnow exercises a multi-term BOOLEAN SHOULD query through the production SQL path. Local BVT execution was unavailable (mo-tester/service is not installed); exact-head CI result is pending.e8fd84b331f168eafd0ec28149b043eaebc7e39dstill materializes postings inglobalStats.df; no new runtime base measurement was made here.qvec,nqftat 8 workers each, three consecutive independent 300-second NQFT windows, success/total, p50/p95/p99, QPS, and zero restart/OOM, with a matchedmaincontrol on the same data/config. A stable, non-interfering execution window is still pending.