Repository navigation
revert(fulltext2): keep cached indexes read-only - #28017
mergify[bot] merged 7 commits into
Conversation
Revert matrixorigin#27462 and its prerequisite matrixorigin#27461, and stop evicting the warm FULLTEXT2 cache after each local CDC flush. Cached indexes remain immutable until the existing stale or TTL lifecycle replaces them. Refs matrixorigin#28005.
…ulltext2-readonly-cache
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? |
|
Updated and pushed the exact-head mainline sync at
|
Updated and pushed commit
No CI, merge, or QA closure is claimed. The existing reviewer requests remain in place. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep review completed on exact HEAD edb9d42df152ddd1f8977bf50cb1b11594327878: APPROVE.
No blocking correctness, performance, liveness, or resource-lifecycle issue found.
What I checked:
- Contract against #28005 and the revert boundary of #27461/#27462: a warm FULLTEXT2 cache entry is no longer evicted or incrementally mutated by committed CDC flushes.
- Counterexamples around concurrent search + CDC, stale/TTL eviction, MERGE/REBUILD, shutdown, failed/cancelled load, partial mmap/tail decode failure, and old-reader/new-generation overlap.
- Ownership/cleanup: every mapped base segment and decoded tail segment is released on partial failures;
Destroyis nil-safe; generic exact-entry deletion and waiter/retry behavior remain intact. - Performance: warm-query hot path is unchanged, CDC no longer forces repeated cold loads or waits, and there is no new logging path. The deliberate tradeoff is that the next stale/TTL replacement performs a full base+tail reload; this is bounded by the existing load budget and occurs on the accepted eventual-freshness boundary.
- Generic vector-cache fixes are preserved; the revert is scoped to the FULLTEXT2 pooling/invalidation mechanism.
Local validation:
go test -mod=readonly -count=1 ./pkg/fulltext2 ./pkg/fulltext2/plugin/compile ./pkg/vectorindex/cache- focused FULLTEXT2 cleanup/error-path tests under
-race -count=20 - focused vector-cache concurrent search/delete, TTL, retry/waiter tests under
-race -count=20 go test -mod=readonly -race -count=1 ./pkg/iscpgit diff --check
All passed. Exact-head Linux UT, SCA, coverage, standalone BVT, and multi-CN BVT are also green.
Accepted behavior: hot entries may expose CDC changes only after the existing stale/TTL cycle (roughly 10–12.5 minutes), as specified by #28005.
Non-blocking follow-ups:
- Add a durable production-path regression that proves a successful non-empty CDC flush does not evict a warm cache entry and does not block concurrent search.
- Update stale comments that still describe CDC-triggered
Cache.Remove.
Merge Queue Status
This pull request spent 23 seconds in the queue, including 1 second running CI. Required conditions to merge
|
This change restores the intended FULLTEXT2 cache contract: a cached search index is immutable and read-only for its entire cache-entry lifetime. It: - reverts the FULLTEXT2 cold-load observability and cross-generation base/tail reuse introduced by matrixorigin#27461 and matrixorigin#27462; - removes the older CDC-triggered `Cache.Remove`, so a successful incremental flush does not evict or refresh the warm search index; - accepts delayed CDC visibility until the existing stale/TTL replacement boundary; - preserves current-main generic vector-cache lifecycle and concurrency fixes used by other index algorithms; - keeps nil-safe failed-load destruction and partial tail-load cleanup as independent correctness safeguards. It does not change SQL, DDL, the FULLTEXT2 index format, ranking, CDC wire protocol, or the generic vector-cache implementation. ### Validation The branch was normally merged with the current `upstream/main` before publication. - exact base: `d37cc0f7b14c3dbd5bc810fc85950cf4da1e9a9b` - exact head: `edb9d42df152ddd1f8977bf50cb1b11594327878` - exact diff hash: `8ad6d4b8ea414c95c23a3ef304a3a3fab1471526506aaebdad3855fe432f8747` - `GOWORK=off go list -mod=readonly ./pkg/fulltext2 ./pkg/fulltext2/plugin/compile`: PASS - fixed the exact-head compile error in storage_mock_test.go by passing int32(types.T_int64) to the existing FrameDeletes(int32, ...) helper; this is test-only and has no runtime semantic change - `git diff --check`: PASS - schema-v6 semantic preflight bound to the exact head and diff hash: PASS - final exact-head self-review covering source/lifecycle/test scope: PASS - repository CGo wrapper and direct fulltext2 tests/build/vet: BLOCKED before compilation by the local environment's missing `cgo/libmo.dylib`/third-party prerequisites and `docfilter` native CGo symbols (`mo_cbitmap_*`/`mo_croaring_*`); no test binary was produced The prior CI run `33711420432` was for the superseded head `f07aff43`; its UT, SCA, and coverage jobs were red, while the two available BVT jobs passed. Job logs were unavailable through the API (404), so no blind rerun was performed. Fresh exact-head CI for `edb9d42d` is the authoritative gate and must finish before merge. ### BVT and QA BVT: N/A for this PR. The changed contract is process-local cache lifetime and accepted delayed visibility after CDC; a deterministic package/race regression and production-path source invariant are the appropriate pre-merge checks. QA is required before closing matrixorigin#28005. Deployment validation should cover CDC with concurrent warm searches, stale/TTL replacement, MERGE/REBUILD, restart, cancellation, and resource cleanup. The PR is Ready for review. No CI, merge, or QA closure is claimed here. Approved by: @XuPeng-SH
This change restores the intended FULLTEXT2 cache contract: a cached search index is immutable and read-only for its entire cache-entry lifetime. It: - reverts the FULLTEXT2 cold-load observability and cross-generation base/tail reuse introduced by matrixorigin#27461 and matrixorigin#27462; - removes the older CDC-triggered `Cache.Remove`, so a successful incremental flush does not evict or refresh the warm search index; - accepts delayed CDC visibility until the existing stale/TTL replacement boundary; - preserves current-main generic vector-cache lifecycle and concurrency fixes used by other index algorithms; - keeps nil-safe failed-load destruction and partial tail-load cleanup as independent correctness safeguards. It does not change SQL, DDL, the FULLTEXT2 index format, ranking, CDC wire protocol, or the generic vector-cache implementation. ### Validation The branch was normally merged with the current `upstream/main` before publication. - exact base: `d37cc0f7b14c3dbd5bc810fc85950cf4da1e9a9b` - exact head: `edb9d42df152ddd1f8977bf50cb1b11594327878` - exact diff hash: `8ad6d4b8ea414c95c23a3ef304a3a3fab1471526506aaebdad3855fe432f8747` - `GOWORK=off go list -mod=readonly ./pkg/fulltext2 ./pkg/fulltext2/plugin/compile`: PASS - fixed the exact-head compile error in storage_mock_test.go by passing int32(types.T_int64) to the existing FrameDeletes(int32, ...) helper; this is test-only and has no runtime semantic change - `git diff --check`: PASS - schema-v6 semantic preflight bound to the exact head and diff hash: PASS - final exact-head self-review covering source/lifecycle/test scope: PASS - repository CGo wrapper and direct fulltext2 tests/build/vet: BLOCKED before compilation by the local environment's missing `cgo/libmo.dylib`/third-party prerequisites and `docfilter` native CGo symbols (`mo_cbitmap_*`/`mo_croaring_*`); no test binary was produced The prior CI run `33711420432` was for the superseded head `f07aff43`; its UT, SCA, and coverage jobs were red, while the two available BVT jobs passed. Job logs were unavailable through the API (404), so no blind rerun was performed. Fresh exact-head CI for `edb9d42d` is the authoritative gate and must finish before merge. ### BVT and QA BVT: N/A for this PR. The changed contract is process-local cache lifetime and accepted delayed visibility after CDC; a deterministic package/race regression and production-path source invariant are the appropriate pre-merge checks. QA is required before closing matrixorigin#28005. Deployment validation should cover CDC with concurrent warm searches, stale/TTL replacement, MERGE/REBUILD, restart, cancellation, and resource cleanup. The PR is Ready for review. No CI, merge, or QA closure is claimed here. Approved by: @XuPeng-SH
This change restores the intended FULLTEXT2 cache contract: a cached search index is immutable and read-only for its entire cache-entry lifetime. It: - reverts the FULLTEXT2 cold-load observability and cross-generation base/tail reuse introduced by matrixorigin#27461 and matrixorigin#27462; - removes the older CDC-triggered `Cache.Remove`, so a successful incremental flush does not evict or refresh the warm search index; - accepts delayed CDC visibility until the existing stale/TTL replacement boundary; - preserves current-main generic vector-cache lifecycle and concurrency fixes used by other index algorithms; - keeps nil-safe failed-load destruction and partial tail-load cleanup as independent correctness safeguards. It does not change SQL, DDL, the FULLTEXT2 index format, ranking, CDC wire protocol, or the generic vector-cache implementation. ### Validation The branch was normally merged with the current `upstream/main` before publication. - exact base: `d37cc0f7b14c3dbd5bc810fc85950cf4da1e9a9b` - exact head: `edb9d42df152ddd1f8977bf50cb1b11594327878` - exact diff hash: `8ad6d4b8ea414c95c23a3ef304a3a3fab1471526506aaebdad3855fe432f8747` - `GOWORK=off go list -mod=readonly ./pkg/fulltext2 ./pkg/fulltext2/plugin/compile`: PASS - fixed the exact-head compile error in storage_mock_test.go by passing int32(types.T_int64) to the existing FrameDeletes(int32, ...) helper; this is test-only and has no runtime semantic change - `git diff --check`: PASS - schema-v6 semantic preflight bound to the exact head and diff hash: PASS - final exact-head self-review covering source/lifecycle/test scope: PASS - repository CGo wrapper and direct fulltext2 tests/build/vet: BLOCKED before compilation by the local environment's missing `cgo/libmo.dylib`/third-party prerequisites and `docfilter` native CGo symbols (`mo_cbitmap_*`/`mo_croaring_*`); no test binary was produced The prior CI run `33711420432` was for the superseded head `f07aff43`; its UT, SCA, and coverage jobs were red, while the two available BVT jobs passed. Job logs were unavailable through the API (404), so no blind rerun was performed. Fresh exact-head CI for `edb9d42d` is the authoritative gate and must finish before merge. ### BVT and QA BVT: N/A for this PR. The changed contract is process-local cache lifetime and accepted delayed visibility after CDC; a deterministic package/race regression and production-path source invariant are the appropriate pre-merge checks. QA is required before closing matrixorigin#28005. Deployment validation should cover CDC with concurrent warm searches, stale/TTL replacement, MERGE/REBUILD, restart, cancellation, and resource cleanup. The PR is Ready for review. No CI, merge, or QA closure is claimed here. Approved by: @XuPeng-SH
What type of PR is this?
Which issue(s) this PR fixes:
issue #28005
What this PR does / why we need it:
This change restores the intended FULLTEXT2 cache contract: a cached search index is immutable and read-only for its entire cache-entry lifetime.
It:
Cache.Remove, so a successful incremental flush does not evict or refresh the warm search index;It does not change SQL, DDL, the FULLTEXT2 index format, ranking, CDC wire protocol, or the generic vector-cache implementation.
Validation
The branch was normally merged with the current
upstream/mainbefore publication.d37cc0f7b14c3dbd5bc810fc85950cf4da1e9a9bedb9d42df152ddd1f8977bf50cb1b115943278788ad6d4b8ea414c95c23a3ef304a3a3fab1471526506aaebdad3855fe432f8747GOWORK=off go list -mod=readonly ./pkg/fulltext2 ./pkg/fulltext2/plugin/compile: PASSgit diff --check: PASScgo/libmo.dylib/third-party prerequisites anddocfilternative CGo symbols (mo_cbitmap_*/mo_croaring_*); no test binary was producedThe prior CI run
33711420432was for the superseded headf07aff43; its UT, SCA, and coverage jobs were red, while the two available BVT jobs passed. Job logs were unavailable through the API (404), so no blind rerun was performed. Fresh exact-head CI foredb9d42dis the authoritative gate and must finish before merge.BVT and QA
BVT: N/A for this PR. The changed contract is process-local cache lifetime and accepted delayed visibility after CDC; a deterministic package/race regression and production-path source invariant are the appropriate pre-merge checks.
QA is required before closing #28005. Deployment validation should cover CDC with concurrent warm searches, stale/TTL replacement, MERGE/REBUILD, restart, cancellation, and resource cleanup.
The PR is Ready for review. No CI, merge, or QA closure is claimed here.