From: Casey Bodley Date: Thu, 2 May 2019 23:05:35 +0000 (-0400) Subject: rgw: RGWUserPubSub::write invalidates its obj_ctx X-Git-Tag: v15.1.0~2748^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c0b9d109015f90a364cd092e63fff3dd98f9612b;p=ceph.git rgw: RGWUserPubSub::write invalidates its obj_ctx Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_pubsub.h b/src/rgw/rgw_pubsub.h index b63c58bb13b1..056cd4fa69b1 100644 --- a/src/rgw/rgw_pubsub.h +++ b/src/rgw/rgw_pubsub.h @@ -628,6 +628,7 @@ int RGWUserPubSub::write(const rgw_raw_obj& obj, const T& info, RGWObjVersionTra return ret; } + obj_ctx.invalidate(obj); return 0; } diff --git a/src/rgw/services/svc_sys_obj_core.h b/src/rgw/services/svc_sys_obj_core.h index 38de7cfc8830..86710e548ca7 100644 --- a/src/rgw/services/svc_sys_obj_core.h +++ b/src/rgw/services/svc_sys_obj_core.h @@ -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()) { diff --git a/src/test/rgw/rgw_multi/tests_ps.py b/src/test/rgw/rgw_multi/tests_ps.py index 3d7c16e5b2c5..72432687d514 100644 --- a/src/test/rgw/rgw_multi/tests_ps.py +++ b/src/test/rgw/rgw_multi/tests_ps.py @@ -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)