morningman opened a new pull request, #437: URL: https://github.com/apache/doris-thirdparty/pull/437
### Background ORC physical range readers share an immutable parsed file tail. Absolute stripe row prefixes are built lazily when the first row reader needs them, and later readers reuse the same prefix buffer. ### What problem does this PR solve? Issue Number: None Related PR: #436 (introduced shared prefixes), apache/doris#70664 (Doris consumer) PR Type: Bugfix Problem Summary: The full Linux BE unit test run timed out in the shared-tail reader test. Its malformed-directory checks throw from a std::call_once callback, which unwinds through a pthread_once C frame. Static Linux runtime combinations do not reliably support this: the baseline fails locally in that unwind path, while the mutex-based candidate passes. Protect prefix initialization with a C++ mutex and publish only a complete buffer, preserving lazy construction, retries, and sharing. ### Details - **Frequency:** Always in the local Linux static-runtime reproduction: the original malformed-directory case and both focused retry cases fail. One Linux CI timeout was observed; the macOS baseline passes. - **Root cause:** Prefix construction throws through pthread_once. The local Linux baseline abort stack identifies the SharedFileTail callback, _Unwind_Resume, and the C personality routine at the original corrupt-directory assertion. A mutex keeps exception unwinding in C++. The local failure is an abort, whereas CI timed out; the exact CI blocking frame is not captured. - **Why existing tests missed it:** The existing shared-tail unit test already checks consecutive ParseError failures and exposed the timeout in CI. Prior native macOS testing uses libc++, where the baseline passes. SQL ORC regression suites do not directly retry one shared malformed stripe directory. - **Fix:** Match the existing shared-statistics mutex pattern. Keep the new buffer private until validation succeeds. Add focused tests for cross-thread retry after allocation failure, repeated invalid directories, one successful publication, and warm reuse. - **Other paths and branches:** Shared-statistics loading already uses a mutex. Inspected master and release branches 3.1, 4.0, 4.1 and 4.2 do not contain this shared-prefix implementation; it is introduced by the candidate consumer branch. No public API, file format, or configuration changes. ### Testing - Native macOS arm64, clang 22.1.8 ASAN: all 516 ORC SDK tests passed through CTest, including the original failing CI case and both new tests. - Four shared-tail cases repeated 100 times: 400 successful case executions. - Linux x86_64 Ubuntu 22.04, GCC 11.4, glibc 2.35, ASAN with static C++/GCC runtimes: the same original case and two retry cases fail on baseline production and pass on the candidate; both use identical test source and compile/link settings. All 516 candidate SDK tests pass, plus 400 shared-tail case executions across 100 iterations. - The full Linux Doris BE unit suite and cluster regression tests have not run; this Linux check builds the SDK component rather than the aggregate Doris executable. ### Notes for Reviewers The diff contains 9 changed production lines and 55 added test lines. A mutex is acquired only during row-reader setup, outside row decoding. The once-backed symbol is absent from the candidate Reader object. The independent CDC signal-receipt failure is not changed or claimed fixed. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Partially verified: the full Linux Doris consumer BE unit suite remains unverified ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Code, tests, investigation, and this 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]
