You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/10/21 02:25:09 UTC

[GitHub] [incubator-doris] morningman commented on a change in pull request #4688: [LRUCache] Expose LRU Cache status to metrics

morningman commented on a change in pull request #4688:
URL: https://github.com/apache/incubator-doris/pull/4688#discussion_r508949115



##########
File path: be/src/olap/lru_cache.cpp
##########
@@ -420,8 +425,7 @@ Slice ShardedLRUCache::value_slice(Handle* handle) {
 }
 
 uint64_t ShardedLRUCache::new_id() {
-    MutexLock l(&_id_mutex);
-    return ++(_last_id);
+    return _last_id.fetch_add(1, std::memory_order_relaxed);;

Review comment:
       ```suggestion
       return _last_id.fetch_add(1, std::memory_order_relaxed);
   ```




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org