mmustafasenoglu commented on PR #66662:
URL: https://github.com/apache/doris/pull/66662#issuecomment-5251807671

   Thanks for the pointers! The PR description above already covers these 
points, but to summarize concisely:
   
   **1. Problem fixed:** ICU `UnicodeString::toLower()` / `toUpper()` without 
an explicit `Locale` internally calls `locale_get_default_69()`, which acquires 
a global mutex. Under concurrent LOWER/UPPER/INITCAP evaluation on UTF-8 data, 
this causes 82% CPU waste on spinlock contention (confirmed via production 
flame graphs in #66439).
   
   **2. Behavior change:** Case conversion now explicitly uses 
`icu::Locale::getRoot()` instead of the process default locale. This eliminates 
the mutex contention and also fixes a latent correctness bug — under a Turkish 
(`tr_TR`) default locale, `I` was incorrectly mapped to `ı` (dotless i) instead 
of `i`.
   
   **3. No new features, no refactoring** — this is a targeted performance + 
correctness fix: 3 call sites modified in 
`be/src/exprs/function/function_string.cpp` (+4/-3 lines).


-- 
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]

Reply via email to