Mryange opened a new pull request, #71152: URL: https://github.com/apache/doris/pull/71152
### Background Doris shares cached segments and column readers across scans. Query iterators carry the page-cache policy for each read. ### What problem does this PR solve? Issue Number: None Related PR: #49040 (moved column reader creation into the cache) PR Type: Bugfix Problem Summary: ThreadSanitizer reported concurrent accesses to a test-only counter, an unused Segment version field, and a page-cache flag shared by column readers. ### Details - **Frequency:** Intermittent when concurrent scans load or reuse segments and initialize or seek column iterators. - **Root cause:** The production loader updated a test counter, query paths wrote obsolete shared Segment state, and iterator initialization mutated the shared reader's cache policy. - **Why existing tests missed it:** Existing cache accounting and column-reader tests exercise load results and individual reader behavior. They do not check cache policy isolation between iterators over a shared reader. - **Fix:** Restrict the atomic counter to BE unit tests, remove the unused field, and pass the request's page-cache policy through index loading and Bloom filter reads. - **Other paths and branches:** Covered ordinal and zone-map loading, prefetch, Bloom filter I/O, and meta_tool. Direct cherry-picks to 4.1 and 4.2 conflict because the index read-ahead and column reader code differs. ### Testing Added focused unit tests for shared ordinal-index and Bloom filter cache policy. The ASAN BE and meta_tool builds passed. All 157 focused BE unit tests across six affected suites passed, including both new cache-policy cases. The additional SegmentCacheTest passed with file caching disabled for that test run. Its default fixture does not initialize the file-cache factory used during tablet cleanup. The configuration was restored after the run. ThreadSanitizer replay has not run. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Partially verified: ThreadSanitizer replay has not run. ### AI Disclosure - Tool: OpenAI Codex (GPT-6) - Generated: Code, tests, and description - Human review: not stated -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
