From: Tobias Urdin Date: Thu, 6 Nov 2025 08:47:52 +0000 (+0100) Subject: rgw/keystone: perf counter for cache hit wrong X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ff70af99748663983dac39636471be9898674b60;p=ceph-ci.git rgw/keystone: perf counter for cache hit wrong The perf counter for cache_hit should not be increased when the token is expired and find() returns false to the caller. When we return false to the caller it will continue creating HTTP requests to Keystone and thus it's a cache miss and not a hit. Signed-off-by: Tobias Urdin --- diff --git a/src/rgw/rgw_keystone.cc b/src/rgw/rgw_keystone.cc index abdf6ed5d28..b36439b0b5e 100644 --- a/src/rgw/rgw_keystone.cc +++ b/src/rgw/rgw_keystone.cc @@ -359,7 +359,7 @@ bool TokenCache::find_locked(const std::string& token_id, rgw::keystone::TokenEn if (entry.token.expired()) { tokens.erase(iter); - if (perfcounter) perfcounter->inc(l_rgw_keystone_token_cache_hit); + if (perfcounter) perfcounter->inc(l_rgw_keystone_token_cache_miss); return false; } token = entry.token;