]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: RGWUserPubSub::write invalidates its obj_ctx
authorCasey Bodley <cbodley@redhat.com>
Thu, 2 May 2019 23:05:35 +0000 (19:05 -0400)
committerYuval Lifshitz <yuvalif@yahoo.com>
Sun, 5 May 2019 07:06:48 +0000 (10:06 +0300)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_pubsub.h
src/rgw/services/svc_sys_obj_core.h
src/test/rgw/rgw_multi/tests_ps.py

index b63c58bb13b194a9fb78e904dea8e74cef6fbb76..056cd4fa69b12c59883b5c3004ffb20ed5c4acdd 100644 (file)
@@ -628,6 +628,7 @@ int RGWUserPubSub::write(const rgw_raw_obj& obj, const T& info, RGWObjVersionTra
     return ret;
   }
 
+  obj_ctx.invalidate(obj);
   return 0;
 }
 
index 38de7cfc8830705f29b1d8ad4c0c508ff6275bb3..86710e548ca756126fe55a31c23faac2a9d6269d 100644 (file)
@@ -84,7 +84,7 @@ public:
     assert (!obj.empty());
     objs_state[obj].prefetch_data = true;
   }
-  void invalidate(rgw_raw_obj& obj) {
+  void invalidate(const rgw_raw_obj& obj) {
     RWLock::WLocker wl(lock);
     auto iter = objs_state.find(obj);
     if (iter == objs_state.end()) {
index 3d7c16e5b2c535a804c45b20a3a811b55b74f8c5..72432687d5140aae4da349426aaec97842fa5b89 100644 (file)
@@ -1443,8 +1443,7 @@ def test_ps_s3_multiple_topics_notification():
     result, _ = s3_notification_conf.get_config()
     print('first try')
     print(result)
-    # FIXME: this is currently failing
-    #assert_equal(len(result['TopicConfigurations']), 2)
+    assert_equal(len(result['TopicConfigurations']), 2)
 
     _, status = s3_notification_conf.set_config()
     assert_equal(status/100, 2)