Skip to content

rgw: bring cls_fifo-based offload for Bucket Index Log - #38185

Closed
rzarzynski wants to merge 72 commits into
ceph:mainfrom
rzarzynski:wip-rgw-bilog-cls_fifo
Closed

rzarzynski wants to merge 72 commits into
ceph:mainfrom
rzarzynski:wip-rgw-bilog-cls_fifo

Conversation

@rzarzynski

Copy link
Copy Markdown
Contributor

This is a continuation of #37786. It brings support for RGWRados::check_disk_state as well as bucket layout.

TODO

  • Use dedicated optional_yield to not block on interactions with cls_fifo.
  • Batching of pushes to cls_fifo.

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

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 api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

It's unnecessary as, after a change, BILog is not touched at
the "prepare" stage of a modification to Bucket Index anymore.
This commit preserves the exact marshalling compatibility.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
It's unnecessary legacy which was blocking the refactor
of RGWRados::Bucket::UpdateIndex.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
Before the commit `RGWRados::cls_obj_complete_cancel()` was
taking the `bilog_flags` parameter. However, this dependency
is superficial -- the input is never used on the cancelation
handling path in `cls_rgw`. Its presence was an artifact
coming from the fact that multiple variants of BI completion
share the same `rgw_cls_obj_complete_op` structure for client-
OSD transport.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
This isn't actually class-specific information but
rather method-specific.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
The complex, two-stage construction pattern is not
necessary. The commit replaces it with single stage
construction taking `rgw_zone_set` optionally.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
It's unnecessary to have the declaration in the header as
all of its users are in the rgw_rados.cc we're moving to.

This commit ONLY moves the code. No additional changes here.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
This enables further modifications towards making clients
of `rgw_cls` aware about the `RGWModifyOp` and other bilog's
details. We want the extra coupling there for the sake of
the cls_fifo-based BI logging which is going to happen at
the client layer.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
This enables further modifications towards making clients
of `rgw_cls` aware about the `RGWModifyOp` and other bilog's
details. We want the extra coupling there for the sake of
the cls_fifo-based BI logging which is going to happen at
the client layer.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
Clients of cls_rgw (RadosGW itself) need to have these
details exposed for the sake of separating BILog in
the future (a.k.a the BILog OMAP offload).

Signed-off-by: Radoslaw Zarzynski <[email protected]>
This commit is focused on switching to `bi_updater` the part
of `RGWRados::cls_obj_complete_op()` that is responsible
for handling AIO completions. It's necessary as `bi_updater`
is the only component responsible for orchestrating BILog
updates. At the moment this boils down to just:

  `svc.zone->get_zone().log_data`

but will be extended by further commits to dispatch between
the cls_fifo-based and omap-based BILog's backends.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
+  /* `RGWRados::get_bucket_stats()` mixes different resposibilities:
+   * retrieval of bucket's statistics with max_marker and sync control.
+   * Unfortunately, this is just a reflection of our data structures.
+   * The same `rgw_bucket_dir_header` carries things from both domains:
+   * _Bucket Index_ and _Bucket Index Log_.
+   * In the future we should consider introduction of an interface:

Signed-off-by: Radoslaw Zarzynski <[email protected]>
In this commit `get_log_status()` of `RGWSI_BILog_RADOS` gets
replaced by `log_get_max_marker()`. The main difference between
them, apart naming (which better reflects the purpose, I hope),
is the arrangement of input. After the rework it's a caller's
responsibility to provide the `rgw_bucket_dir_header` map.
That is, the method is no longer tasked with retrieving it which
was accomplished via `RGWSI_BucketIndex_RADOS::cls_bucket_head()`.
The motivation here is the need to differentiate the `max_marker`
handling between the BILog backends.

The commit also renames the `cls_bucket_head()` methods to
`get_dir_headers()`.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
The idea here is to make the `BucketIndexShardsManager`-based
policy for primitive `max_marker` calculation to the InIndex
backend BILog.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
In this commit the `BILogUpdateBatchFIFO` explicitly calls
`RGWSI_BILog_RADOS_FIFO` to prepare a handle to `cls_fifo`.
Apart from deduplicating the code, it strengthens the coupling
between these two classes which is actually good -- they are
truly interconnected and this bond should be reflected.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
`RGWOp_BILog_Info` selects the bucket to provide information
about using two alternative parameters from a query string:
  * `bucket` or
  * `bucket-instance`.
However, the current implementation de facto accepts only
the latter one. The problem arose because of unconditional
`rgw_bucket_parse_bucket_instance()` -- even when `bucket-
instance` is empty. This leads to constantly returning
`EINVAL` when a client uses `bucket`.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
@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

@stale

stale Bot commented Jul 21, 2021

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@stale stale Bot added the stale label Jul 21, 2021
@djgalloway
djgalloway changed the base branch from master to main July 7, 2022 00:00
@github-actions github-actions Bot removed the stale label Jul 27, 2022
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions Bot added the stale label Oct 28, 2022
@github-actions

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

@github-actions github-actions Bot closed this Nov 27, 2022
@smanjara smanjara mentioned this pull request Oct 28, 2025
14 tasks
@smanjara smanjara mentioned this pull request Mar 26, 2026
14 tasks
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.

1 participant