]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw/notification: fix zero eventTime in bucket notifications on concurrent PUT race 69033/head
authorKrunal Chheda <kchheda3@bloomberg.net>
Wed, 20 May 2026 18:14:22 +0000 (14:14 -0400)
committerKrunal Chheda <kchheda3@bloomberg.net>
Thu, 21 May 2026 14:28:46 +0000 (10:28 -0400)
commit0064cc00eeb2911c4b9cc417a34b026a70e9d1ad
tree4a016e39576ac08ca78b8e16a666545307921c94
parent017ef995cbd37d76a42ee6c9992ffad3ef4352b2
rgw/notification: fix zero eventTime in bucket notifications on concurrent PUT race

When concurrent PUTs target the same object key, RADOS may return
-ECANCELED to the losing writers. In that path *meta.mtime was never
populated from meta.set_mtime, leaving mtime at epoch (zero), which
propagated into bucket notification eventTime as
"1970-01-01T00:00:00.000Z".

Fix: set *meta.mtime from meta.set_mtime before returning 0 in the
ECANCELED/ENOENT/EEXIST early-return block, matching the behaviour of
the successful write path.

Also add a regression test that fires 20 concurrent threads writing
the same key and asserts no event in the persistent queue carries a
zero eventTime.

Fixes: https://tracker.ceph.com/issues/76729
Signed-off-by: Krunal Chheda <kchheda3@bloomberg.net>
src/rgw/driver/rados/rgw_rados.cc
src/test/rgw/bucket_notification/test_bn.py