Skip to content

fifo-based bucket index log - #67774

Merged
smanjara merged 38 commits into
ceph:mainfrom
smanjara:wip-rework-bilog
Sep 4, 2026
Merged

smanjara merged 38 commits into
ceph:mainfrom
smanjara:wip-rework-bilog

Conversation

@smanjara

@smanjara smanjara commented Mar 13, 2026 •

Copy link
Copy Markdown
Contributor

replaces #66074 and the original PR #38185

design: https://gist.github.com/smanjara/c311d2ea14aed094cd69ea416e04d16a

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

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

@github-actions

github-actions Bot commented Mar 13, 2026 •

Copy link
Copy Markdown

Config Diff Tool Output

+ added: rgw_default_data_log_backing (rgw.yaml.in)
+ added: rgw_default_bucket_bilog_type (rgw.yaml.in)

The above configuration changes are found in the PR. Please update the relevant release documentation if necessary.
Ignore this comment if docs are already updated. To make the "Check ceph config changes" CI check pass, please comment /config check ok and re-run the test.

@smanjara

Copy link
Copy Markdown
Contributor Author

rebasing was getting harder. applied changes on top of main, so it builds.

@smanjara smanjara mentioned this pull request Mar 13, 2026
14 tasks
@smanjara
smanjara marked this pull request as ready for review March 26, 2026 17:23
@smanjara
smanjara requested a review from a team as a code owner March 26, 2026 17:23

@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.

some initial thoughts

Comment thread src/rgw/rgw_bucket_layout.cc Resolved
Comment thread src/rgw/driver/rados/rgw_bucket.cc Resolved
Comment thread src/rgw/driver/rados/rgw_bilog.h 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

Comment thread src/rgw/driver/rados/rgw_rados.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

@smanjara
smanjara force-pushed the wip-rework-bilog branch from daccb99 to d18d3bb Compare May 7, 2026 23:39
@smanjara
smanjara force-pushed the wip-rework-bilog branch 2 times, most recently from d5b1279 to e116d3a Compare May 20, 2026 21:52
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

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

@smanjara
smanjara force-pushed the wip-rework-bilog branch from 798277e to 675cf75 Compare June 3, 2026 19:25
Shilpa Jagannath added 16 commits August 28, 2026 18:05
add OPERATION_RETURNVEC to both ops and decode the committed epoch
from the returned bufferlist before writing the bilog entry.

also fix the link_epoch value in apply_olh_log(), when replaying a
CLS_RGW_OLH_OP_LINK_OLH entry from bilog

Signed-off-by: Shilpa Jagannath <[email protected]>
added two coroutines: RGWFIFOBILogTrimShardCR - coroutine that
submits via trim_shard and reads the result from cn->completion().
TrimFIFOGenerationCR - spawns per-shard CRs concurrently.

fix RGWOp_BILog_Info / RGWOp_BILog_List to report FIFO shard counts and
the FIFO tail marker instead of index shard counts.

Signed-off-by: Shilpa Jagannath <[email protected]>
Signed-off-by: Shilpa Jagannath <[email protected]>
pass hash_key through add_datalog_entry() and compute the correct
bilog shard when the log type is FIFO.

Signed-off-by: Shilpa Jagannath <[email protected]>
use the correct index layout to read stats from

Signed-off-by: Shilpa Jagannath <[email protected]>
push a CLS_RGW_OP_SYNCSTOP/CLS_RGW_OP_RESYNC entry into the fifo
shards so that the secondary's incremental sync detects the state
change from bilog just like the InIndex bilog.

fifo has no per-shard omap header. we will have to rely on the
BucketInfo flag datasync_flag_enabled. bilog_info polls this flag to
set syncstopped and it also gates the bilog writes on primary.

Signed-off-by: Shilpa Jagannath <[email protected]>
- copy over the correct ver{pool=poolid, epoch=epoch} and pass it into
bilog. with ver.pool >= 0, secondary sync treats it as expected and
does not extract it as olh_epoch.
- remove the duplicate bilog entry from apply_olh_log
- add_maybe_flush for LINK_OLH and UNLINK_INSTANCE passes in timestamp

Signed-off-by: Shilpa Jagannath <[email protected]>
this is a known Boost bug fixed in 1.87

Signed-off-by: Shilpa Jagannath <[email protected]>
and update design doc.

Signed-off-by: Shilpa Jagannath <[email protected]>
use rgw::num_shards() wherever necessary, which provides the
log count conditional upon the log type

Signed-off-by: Shilpa Jagannath <[email protected]>
@smanjara

Copy link
Copy Markdown
Contributor Author

@smanjara

smanjara commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Looks good to me, only real concern I have is that I'd rather not add in blocking if we can help it.

none of the S3 operations doing the bilog ops are actually blocking. they get the yield y passed into them. use_blocked is just a fallback but probably unnecessary. are you concerned about any of the calls in particular?

@adamemerson

Copy link
Copy Markdown
Contributor

Looks good to me, only real concern I have is that I'd rather not add in blocking if we can help it.

none of the S3 operations doing the bilog ops are actually blocking. they get the yield y passed into them. use_blocked is just a fallback but probably unnecessary. are you concerned about any of the calls in particular?

Nono. I just wanted to make sure we just weren't adding new block-only stuff.

@smanjara
smanjara merged commit 4b8199a into ceph:main Sep 4, 2026
7 checks passed
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I have resolved the following tracker ticket due to the merge of this PR:

No backports are pending for the ticket. If this is incorrect, please update the tracker
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/33915470404

RaminNietzsche added a commit to RaminNietzsche/ceph that referenced this pull request Sep 6, 2026
Merge ceph/main into wip-rgw-admin-cleanup. Resolve radosgw-admin.cc
conflicts by keeping the modular layout. Port bilog list loop fix and
FIFO bucket sync layout handling from main (ceph#67774) into bilog.cc and
bucket_sync.cc.

Conflicts:
- src/rgw/radosgw-admin/radosgw-admin.cc: kept modular dispatcher;
  discarded monolithic main hunks (handlers live in per-domain modules).
- src/rgw/CMakeLists.txt: kept module source list and rgw_bilog.cc from main.
- src/test/rgw/CMakeLists.txt: kept account exit-code tests and test_bilog.cc.

Signed-off-by: ramin.najarbashi <[email protected]>
Comment on lines -8481 to +8502
bool add_log = log_op && store->svc.zone->need_to_log_data();
const bool add_log = log_op && store->svc.zone->need_to_log_data();

ret = store->cls_obj_complete_add(*bs, obj, optag, poolid, epoch, ent, category, remove_objs, bilog_flags, zones_trace, add_log);
ret = store->cls_obj_complete_add(dpp, target->bucket_info, *bs, obj, optag,
poolid, epoch, ent, category,
remove_objs, bilog_flags, y, zones_trace,
log_op);
if (add_log) {
ret = add_datalog_entry(dpp, store->svc.datalog_rados,
target->bucket_info, bs->shard_id, y);
target->bucket_info, obj.get_hash_object(),
bs->shard_id, y);

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.

in the call to cls_obj_complete_add(), you changed the argument from add_log to log_op. was that intentional?

as a result, we now use a different condition for writing the bilog entry than we do for the datalog entry - only the latter consults need_to_log_data()

same goes for other changes to cls_obj_complete_del() cls_obj_complete_cancel() etc below

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.

we still consult need_to_log_data() within int with_bilog(). the conditional logic for bilog was intentionally moved into https://github.com/ceph/ceph/blob/main/src/rgw/driver/rados/rgw_rados.h#L1644 to handle backend selection plus additional logic required to make fifo work with bucket sync enable/disable bf6d7b5.

Comment on lines +11139 to +11142
bilog_handler.add_maybe_flush(
op_issuer.op, bilog_ent, zones_trace);
int flush_r = bilog_handler.flush(y);
if (flush_r < 0) {

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.

am i correct that this bilog write is synchronous wrt callers of RGWRados::cls_obj_complete_op() like write_meta()?

ultimately we want both the bilog write and the datalog write to be asynchronous so clients don't have to wait for it to get their response. this is more of a performance issue than a correctness one

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.

4 participants