Baymine opened a new pull request, #66440: URL: https://github.com/apache/doris/pull/66440
### What problem does this PR solve? Issue Number: close #66439 Problem Summary: ICU's `UnicodeString::toLower()` / `toUpper()` with no explicit Locale argument internally calls `locale_get_default_69()`, which acquires a global mutex. Under concurrent multi-threaded LOWER/UPPER/INITCAP evaluation on UTF-8 data (e.g. a 20 TB Hudi scan with `lower(event_id) LIKE '%pattern%'` predicates), this mutex becomes a severe CPU bottleneck — flame graphs show 82% of CPU samples in `native_queued_spin_lock_slowpath` below `locale_get_default_69`. Passing `icu::Locale::getRoot()` explicitly bypasses the default-locale lookup entirely, eliminating the lock contention. This also makes case conversion deterministic across BE hosts regardless of process environment locale. ### Release note Yes: LOWER/UPPER/INITCAP now use the ICU root locale for case conversion, making results independent of the process default locale. This is a behavior change for deployments where the BE process runs under a non-root locale (e.g. Turkish locale would have mapped 'I' to 'ı' (dotless i) instead of 'i'). ### Check List (For Author) - Test: BE unit tests (function_string_lower_test, function_string_upper_test, function_initcap, function_string_case_root_locale_test) - Behavior changed: Yes — case conversion now uses root locale instead of process default locale - Does this need documentation: No -- 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]
