zclllyybb commented on code in PR #22694:
URL: https://github.com/apache/doris/pull/22694#discussion_r1290447610
##########
be/src/vec/functions/function_cast.h:
##########
@@ -125,13 +126,13 @@ struct TimeCast {
// '300' -> 00:03:00 '20:23' -> 20:23:00 '20:23:24' -> 20:23:24
template <typename T>
static bool try_parse_time(char* s, size_t len, T& x, const
cctz::time_zone& local_time_zone,
- ZoneList& time_zone_cache) {
+ ZoneList& time_zone_cache, std::shared_mutex&
cache_lock) {
Review Comment:
thread
local的话只针对单线程,如果查询涉及到多个线程其实是不共享的。这样改了之后当多次涉及到时区的查询把缓存填充了之后,理论上就不再会触发写锁了。可以看做那个时候只剩读锁,不影响性能了
--
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]