Skip to content

rgw, [RFC]: cls_fifo-based BILog, the writer and reader parts - #37786

Closed
rzarzynski wants to merge 70 commits into
ceph:masterfrom
rzarzynski:wip-rgw-bilog-in-cls_fifo_reader
Closed

rzarzynski wants to merge 70 commits into
ceph:masterfrom
rzarzynski:wip-rgw-bilog-in-cls_fifo_reader

Conversation

@rzarzynski

@rzarzynski rzarzynski commented Oct 25, 2020 •

Copy link
Copy Markdown
Contributor

This is the continuation of #37108.

TODO

  • Selection of the BILog's backend depending on bucket layout.
  • 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]>
The idea is to use a compiler to ensure there is no data
modification between the place an operation is decoded
and the call to `log_index_operation()`.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
This is the part for `rgw_bucket_unlink_instance()`.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
It's never used neither in the case of `rgw_bucket_dir_entry`
nor `rgw_bi_log_entry`.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
This commit also makes tiny clean-ups (like limiting
a variable's scope) in the areas of the main change.

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 `lot_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]>
@rzarzynski
rzarzynski force-pushed the wip-rgw-bilog-in-cls_fifo_reader branch from d2a51d4 to e6e787a Compare October 25, 2020 22:07
Comment thread src/rgw/rgw_rados.cc
list_state,
get_zones_trace(svc.zone->get_zone(),
bucket_info.bucket,
nullptr));

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.

The check_disk_state() paths miss zones_trace usually saw when modifying BILog. Passing nullptr here, so the returned rgw_zone_set instance will have single item only: the one constructed basing on RGWRados::svc.zone->get_zone(). Is this enough?

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