Skip to content

rgw: Close datalog write hole - #56499

Merged
cbodley merged 49 commits into
ceph:mainfrom
adamemerson:wip-rgw-close-datalog-write-hole
Apr 3, 2025
Merged

cbodley merged 49 commits into
ceph:mainfrom
adamemerson:wip-rgw-close-datalog-write-hole

Conversation

@adamemerson

@adamemerson adamemerson commented Mar 27, 2024 •

Copy link
Copy Markdown
Contributor

A specter is haunting RGW.

The specter of objects not syncing if RGW crashes between adding them to to the set of bucketshards to be refreshed and actually writing the entry into FIFO.

This PR will close that write hole.

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

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
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@github-actions

github-actions Bot commented Apr 3, 2024

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@adamemerson
adamemerson force-pushed the wip-rgw-close-datalog-write-hole branch from eb6c991 to b1570cb Compare April 12, 2024 00:06
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@adamemerson
adamemerson force-pushed the wip-rgw-close-datalog-write-hole branch 3 times, most recently from 87c1016 to 4ea1c77 Compare April 16, 2024 16:08
@adamemerson
adamemerson force-pushed the wip-rgw-close-datalog-write-hole branch from 4ea1c77 to 4deb05c Compare April 25, 2024 23:37
@adamemerson
adamemerson force-pushed the wip-rgw-close-datalog-write-hole branch 3 times, most recently from 600c530 to 95455d5 Compare April 30, 2024 00:28
@adamemerson
adamemerson marked this pull request as ready for review April 30, 2024 00:29
@adamemerson
adamemerson requested a review from a team as a code owner April 30, 2024 00:29
@adamemerson
adamemerson force-pushed the wip-rgw-close-datalog-write-hole branch from 95455d5 to 2710fb4 Compare May 1, 2024 16:10

@cbodley cbodley left a comment

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.

not done yet, but sharing initial review up to commit 'common/async: Non-blocking condition variable'

Comment thread src/neorados/cls/version.h Resolved
Comment thread src/neorados/cls/log.h Resolved
Comment thread src/test/cls_log/test_neocls_log.cc Resolved
Comment thread src/common/async/async_call.h Resolved
Comment thread src/common/async/async_call.h Resolved
Comment thread src/common/async/coro_aiocomplete.h Resolved
Comment thread src/common/async/async_yield.h Resolved
Comment thread src/common/async/async_cond.h Resolved
Comment thread src/common/async/async_cond.h Resolved
Comment thread src/common/async/async_cond.h Resolved
@adamemerson
adamemerson requested a review from a team as a code owner May 7, 2024 17:54
Comment thread src/rgw/driver/rados/rgw_datalog.cc Resolved
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@cbodley cbodley left a comment

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.

more review, haven't gotten to the recovery bits yet

Comment thread src/cls/sem_set/module.cc Resolved
Comment thread src/cls/sem_set/module.cc Resolved
Comment thread src/cls/sem_set/module.cc Resolved
Comment thread src/cls/sem_set/ops.h Resolved
Comment thread src/cls/sem_set/module.cc Resolved
Comment thread src/rgw/driver/rados/rgw_datalog.cc Resolved
Comment thread src/rgw/driver/rados/rgw_neorados.h Resolved
Comment thread src/rgw/driver/rados/rgw_neorados.h Resolved
Comment thread src/rgw/driver/rados/rgw_datalog.cc Resolved
Comment thread src/rgw/driver/rados/rgw_neorados.cc Resolved
@adamemerson
adamemerson force-pushed the wip-rgw-close-datalog-write-hole branch from 876025d to c8b3e9f Compare May 13, 2024 21:44
adamemerson and others added 24 commits April 1, 2025 11:10
This stores a collection of key-based semaphores, intended to serve as
a backend to the project to close the datalog write-hole.

Signed-off-by: Adam Emerson <[email protected]>
Signed-off-by: Adam Emerson <[email protected]>
Since we're plumbing the driver around and it's where our neorados
handle lives.

Signed-off-by: Adam C. Emerson <[email protected]>
Rewrite all of `RGWDataChangesLog` and supporting classes to use
non-blocking, C++20 coroutines.

Make interfaces for `optional_yield` and `librados::AioCompletion`.

Signed-off-by: Adam C. Emerson <[email protected]>
Except in one particular case.

This is necessary to close the data replication write hole, so that if
we fail to write to the semaphore set, the client will receive an
error.

Signed-off-by: Adam Emerson <[email protected]>
So we can reconstitute bucket shards from listings during recovery.

Signed-off-by: Adam Emerson <[email protected]>
Increment in add_entry, decrement in renew_entry, and recover on
startup.

Signed-off-by: Adam Emerson <[email protected]>
Also tests renew_entry, backend, and list.

Signed-off-by: Adam Emerson <[email protected]>
Since, outside of testing, it's only called from stackful coroutines,
for now.

Signed-off-by: Adam Emerson <[email protected]>
This works fine on GCC11, which is the actual target we use for
builds on Shaman.

Signed-off-by: Adam Emerson <[email protected]>
Process shards piecewise. Send each set of shards in a window to the
other RGWs and have them acknowledge having it or not.

Signed-off-by: Adam Emerson <[email protected]>
This guards against an excess decrement in the sequence:

RGW_a: Fetch sem_set (see key 'foo')
RGW_b: run renew_entry ('foo' is no longer in `cur_cycle`)
RGW_a: notify (does not see 'foo' in response)
RGW_a: Decrements 'foo'

Signed-off-by: Adam Emerson <[email protected]>
@adamemerson

Copy link
Copy Markdown
Contributor Author

@cbodley The multisite failures are the known ones we had discussed.

https://pulpito.ceph.com/aemerson-2025-04-01_18:38:10-rgw-wip-rgw-close-datalog-write-hole-distro-default-smithi/

@adamemerson

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

1 similar comment
@adamemerson

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@adamemerson

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@adamemerson

Copy link
Copy Markdown
Contributor Author

jenkins test windows

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.

5 participants