From c0b9d109015f90a364cd092e63fff3dd98f9612b Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 2 May 2019 19:05:35 -0400 Subject: [PATCH] rgw: RGWUserPubSub::write invalidates its obj_ctx Signed-off-by: Casey Bodley --- src/rgw/rgw_pubsub.h | 1 + src/rgw/services/svc_sys_obj_core.h | 2 +- src/test/rgw/rgw_multi/tests_ps.py | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rgw/rgw_pubsub.h b/src/rgw/rgw_pubsub.h index b63c58bb13b..056cd4fa69b 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 38de7cfc883..86710e548ca 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 3d7c16e5b2c..72432687d51 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) -- 2.47.3