summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryuval Lifshitz <ylifshit@redhat.com>2022-11-14 16:58:30 +0100
committeryuval Lifshitz <ylifshit@redhat.com>2022-11-14 16:58:30 +0100
commit56a929cbbe01e5dd521fa096bc111da2cd351801 (patch)
treeb60284f3957dd9455ca8690fac16d75632c68dbc
parentMerge pull request #48870 from zdover23/wip-doc-2022-11-14-glossary-mds (diff)
downloadceph-56a929cbbe01e5dd521fa096bc111da2cd351801.tar.xz
ceph-56a929cbbe01e5dd521fa096bc111da2cd351801.zip
rgw/notifications: send mtime in complete multipart upload event
this is a regression from: 61120ff1470eb6a9c3abb86cf5c88ee83d018ca2 Fixes: https://tracker.ceph.com/issues/58020 Signed-off-by: yuval Lifshitz <ylifshit@redhat.com>
-rw-r--r--src/rgw/rgw_op.cc2
-rw-r--r--src/test/rgw/bucket_notification/test_bn.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc
index 90c40778f21..5f87e4170b6 100644
--- a/src/rgw/rgw_op.cc
+++ b/src/rgw/rgw_op.cc
@@ -6462,7 +6462,7 @@ void RGWCompleteMultipart::execute(optional_yield y)
}
// send request to notification manager
- int ret = res->publish_commit(this, ofs, target_obj->get_mtime(), etag, target_obj->get_instance());
+ int ret = res->publish_commit(this, ofs, upload->get_mtime(), etag, target_obj->get_instance());
if (ret < 0) {
ldpp_dout(this, 1) << "ERROR: publishing notification failed, with error: " << ret << dendl;
// too late to rollback operation, hence op_ret is not set here
diff --git a/src/test/rgw/bucket_notification/test_bn.py b/src/test/rgw/bucket_notification/test_bn.py
index cb09d4aa38b..a80ad6582e4 100644
--- a/src/test/rgw/bucket_notification/test_bn.py
+++ b/src/test/rgw/bucket_notification/test_bn.py
@@ -2140,7 +2140,8 @@ def test_ps_s3_multipart_on_master():
assert_equal(len(events), 1)
assert_equal(events[0]['Records'][0]['eventName'], 'ObjectCreated:CompleteMultipartUpload')
assert_equal(events[0]['Records'][0]['s3']['configurationId'], notification_name+'_3')
- print(events[0]['Records'][0]['s3']['object']['size'])
+ assert_equal(events[0]['Records'][0]['s3']['object']['size'], object_size)
+ assert events[0]['Records'][0]['eventTime'] != '0.000000', 'invalid eventTime'
# cleanup
stop_amqp_receiver(receiver1, task1)