]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: update ObjectCacheInfo::time_added on overwrite 22643/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 30 May 2018 13:20:01 +0000 (09:20 -0400)
committerPrashant D <pdhange@redhat.com>
Wed, 20 Jun 2018 11:09:08 +0000 (07:09 -0400)
Fixes: http://tracker.ceph.com/issues/24346
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 124eb5f28cf6e8a33a0d72a1ead8281f6a4e84a7)

src/rgw/rgw_cache.cc
src/rgw/rgw_cache.h

index 797e22bc3dc4beba2bfa70305b3df992c5538004..7dc2156b0a5cf968c5fa40fde78d61e7e92339c9 100644 (file)
@@ -127,6 +127,7 @@ void ObjectCache::put(const string& name, ObjectCacheInfo& info, rgw_cache_entry
 
   auto [iter, inserted] = cache_map.emplace(name, ObjectCacheEntry{});
   ObjectCacheEntry& entry = iter->second;
+  entry.info.time_added = ceph::coarse_mono_clock::now();
   if (inserted) {
     entry.lru_iter = lru.end();
   }
index d62f0a391b7eff60911a3160e107752e7e934d6b..af94de8248ee9d3b32eb7f2c6730249f583cd201 100644 (file)
@@ -58,7 +58,7 @@ struct ObjectCacheInfo {
   map<string, bufferlist> rm_xattrs;
   ObjectMetaInfo meta;
   obj_version version = {};
-  ceph::coarse_mono_time time_added = ceph::coarse_mono_clock::now();
+  ceph::coarse_mono_time time_added;
 
   ObjectCacheInfo() = default;