]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/keystone: perf counter for cache hit wrong
authorTobias Urdin <tobias.urdin@binero.com>
Thu, 6 Nov 2025 08:47:52 +0000 (09:47 +0100)
committerTobias Urdin <tobias.urdin@binero.com>
Thu, 6 Nov 2025 08:47:52 +0000 (09:47 +0100)
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 <tobias.urdin@binero.com>
src/rgw/rgw_keystone.cc

index abdf6ed5d282e1b90d82a9bc5442eae762fa092b..b36439b0b5ed1b183e2929570342711a6b54c513 100644 (file)
@@ -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;