github-actions[bot] commented on code in PR #42357:
URL: https://github.com/apache/doris/pull/42357#discussion_r1814084760


##########
be/src/olap/lru_cache.cpp:
##########
@@ -207,6 +209,16 @@ uint64_t LRUCache::get_hit_count() {
     return _hit_count;
 }
 
+uint64_t LRUCache::get_stampede_count() {
+    std::lock_guard l(_mutex);
+    return _stampede_count;
+}

Review Comment:
   warning: method 'get_capacity' can be made const 
[readability-make-member-function-const]
   
   be/src/olap/lru_cache.h:353:
   ```diff
   -     size_t get_capacity();
   +     size_t get_capacity() const;
   ```
   
   ```suggestion
   size_t LRUCache::get_capacity() const {
   ```
   



##########
be/src/olap/lru_cache.cpp:
##########
@@ -207,6 +209,16 @@
     return _hit_count;
 }
 
+uint64_t LRUCache::get_stampede_count() {
+    std::lock_guard l(_mutex);
+    return _stampede_count;
+}
+
+uint64_t LRUCache::get_miss_count() {

Review Comment:
   warning: method 'get_miss_count' can be made const 
[readability-make-member-function-const]
   
   be/src/olap/lru_cache.h:353:
   ```diff
   -     uint64_t get_miss_count();
   +     uint64_t get_miss_count() const;
   ```
   
   ```suggestion
   uint64_t LRUCache::get_miss_count() const {
   ```
   



##########
be/src/olap/lru_cache.cpp:
##########
@@ -207,6 +209,16 @@ uint64_t LRUCache::get_hit_count() {
     return _hit_count;
 }
 
+uint64_t LRUCache::get_stampede_count() {

Review Comment:
   warning: method 'get_stampede_count' can be made const 
[readability-make-member-function-const]
   
   be/src/olap/lru_cache.h:354:
   ```diff
   -     uint64_t get_stampede_count();
   +     uint64_t get_stampede_count() const;
   ```
   
   ```suggestion
   uint64_t LRUCache::get_stampede_count() const {
   ```
   



-- 
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: commits-unsubscr...@doris.apache.org

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


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

Reply via email to