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


##########
be/src/olap/lru_cache.h:
##########
@@ -422,9 +578,8 @@ class ShardedLRUCache : public Cache {
 private:
     void update_cache_metrics() const;
 
-private:
     static uint32_t _hash_slice(const CacheKey& s);
-    uint32_t _shard(uint32_t hash) {
+    uint32_t _shard(uint32_t hash) const {
         return _num_shard_bits > 0 ? (hash >> (32 - _num_shard_bits)) : 0;

Review Comment:
   warning: function '_shard' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
    [[nodiscard]] uint32_t _shard(uint32_t hash) 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