Skip to content

rgw/notification: fix zero eventTime in bucket notifications on concurrent PUT race - #69033

Merged
yuvalif merged 1 commit into
ceph:mainfrom
kchheda3:fix-76729-notif-eventtime-race
Jun 9, 2026
Merged

yuvalif merged 1 commit into
ceph:mainfrom
kchheda3:fix-76729-notif-eventtime-race

Conversation

@kchheda3

Copy link
Copy Markdown
Contributor

Fixes: https://tracker.ceph.com/issues/76729

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@kchheda3
kchheda3 requested a review from a team as a code owner May 20, 2026 18:15
if event_time in ('0.000000', '1970-01-01T00:00:00.000Z',
'1970-01-01T00:00:00.000000Z', ''):
zero_time_count += 1
print(f'FOUND zero eventTime: '

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use log instead of print.
this will be showing at the right order in the teuthology log file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use log instead of print. this will be showing at the right order in the teuthology log file

done

…rrent 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 <[email protected]>
@kchheda3
kchheda3 force-pushed the fix-76729-notif-eventtime-race branch from e02b115 to 0064cc0 Compare May 21, 2026 14:28
@kchheda3
kchheda3 requested a review from yuvalif May 21, 2026 14:29
@anrao19

anrao19 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

pr testing completed and approved by @ivancich , tracker details : https://tracker.ceph.com/issues/77211
@kchheda3 , if no further testing is needed then this can be merged

@yuvalif
yuvalif merged commit e8e8e6f into ceph:main Jun 9, 2026
6 checks passed
@kchheda3
kchheda3 deleted the fix-76729-notif-eventtime-race branch June 9, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants