Uh oh!
There was an error while loading. Please reload this page.
[fix](be) Isolate SNII cache across analyzer generations - #66876
[fix](be) Isolate SNII cache across analyzer generations#66876airborne12 wants to merge 1 commit into
Conversation
hello-stephen
commented
Aug 18, 2026
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
airborne12
commented
Aug 18, 2026
run buildall |
hello-stephen
commented
Aug 18, 2026
TPC-H: Total hot run time: 17143 ms |
hello-stephen
commented
Aug 18, 2026
TPC-DS: Total hot run time: 80117 ms |
### What problem does this PR solve? Issue Number: None Related PR: apache#66052 Problem Summary: SNII keyed its result cache and query single-flight by the raw query before analysis. Plain custom-analyzer segments do not persist an immutable analyzer identity, so two live generations under the same analyzer name could tokenize identical raw bytes differently while reusing the first generation bitmap. Gate pre-analysis sharing with the existing analyzer-context capability. Providers without a segment-fixed identity now analyze independently, while raw pattern queries and contexts with complete immutable CommonGrams identity retain sharing. Update the existing admission and partial-failure tests to reproduce the isolation contract by preloading the same raw query and proving providers without complete immutable identity bypass that stale entry. ### Release note Prevent SNII queries from reusing cached results produced by a different custom analyzer generation. ### Check List (For Author) - Test: Unit Test - InvertedIndexReaderAnalysisPurposeTest.* - SniiIndexReaderCountFallback.* - 37/37 focused ASAN unit tests passed - ./build.sh --be -j 192 - Behavior changed: Yes. SNII bypasses pre-analysis result sharing when analyzer semantics are not fixed by immutable segment identity. - Does this need documentation: No
379a69a to
0c7cd3bCompareairborne12
commented
Aug 18, 2026
The failed BE UTs were stale expectations exposed by this PR, not a production regression. They asserted that SNII could consult a raw-query cache entry even when the request provider had no complete immutable analyzer identity, which is exactly the cross-generation reuse this PR removes. The revised test preloads the identical raw query, then verifies that incomplete/no-identity providers bypass that entry, enter the segment, and invoke their own analyzer. Red: the three reported tests failed locally with the old expectations. Green: |
airborne12
commented
Aug 18, 2026
run buildall |
hello-stephen
commented
Aug 18, 2026
TPC-H: Total hot run time: 17001 ms |
hello-stephen
commented
Aug 18, 2026
TPC-DS: Total hot run time: 80629 ms |
What problem does this PR solve?
Issue Number: None
Related PR: #66052
Problem Summary:
SNII keyed its result cache and query single-flight by the raw query before analysis. Plain custom-analyzer segments do not persist an immutable analyzer identity, so two live generations under the same analyzer name could tokenize identical raw bytes differently while reusing the first generation bitmap. Gate pre-analysis sharing with the existing analyzer-context capability. Providers without a segment-fixed identity now analyze independently, while raw pattern queries and contexts with complete immutable CommonGrams identity retain sharing. Existing admission and partial-failure tests now preload the same raw query and prove that providers without complete immutable identity bypass the stale entry.
Release note
Prevent SNII queries from reusing cached results produced by a different custom analyzer generation.
Check List (For Author)
Test
Tests run:
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)