]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: update ObjectCacheInfo::time_added on overwrite 22324/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 30 May 2018 13:20:01 +0000 (09:20 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 30 May 2018 13:34:12 +0000 (09:34 -0400)
Fixes: http://tracker.ceph.com/issues/24346
Signed-off-by: Casey Bodley <cbodley@redhat.com>
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 1911db9bcf4ba0ca8e23a3eb8d179da47c61390c..6dfc0318d501b674cd42757a8e2e7760bdb98dc7 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;