Repository navigation
rgw: cls_fifo-based BILog, the updater part - #37108
rzarzynski wants to merge 46 commits into
Conversation
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]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
…ence. Signed-off-by: Radoslaw Zarzynski <[email protected]>
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]>
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]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
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]>
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]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
f4a9bda to
98971b0
Compare
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]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
This is the part for `rgw_bucket_unlink_instance()`. Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
The motivation is to the have `op_type` member variable available also at run-time in contrast to the already existing, compile-time handled `OpType`. This enables making CLSRGWBILogOp's derivates constructible from the low-level, wire-related bits: * rgw_cls_unlink_instance_op, * rgw_cls_link_olh_op, * rgw_cls_obj_complete_op. Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
The rationale is to unify the naming convention with other, bilog-related call operations. This will come handy when dissecting the common part. Signed-off-by: Radoslaw Zarzynski <[email protected]>
Let's unify the naming convention for the sake of upcoming rework. Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
* rgw_cls_obj_complete_op * rgw_cls_link_olh_op * rgw_cls_unlink_instance_op Signed-off-by: Radoslaw Zarzynski <[email protected]>
This allows the unification with cls_rgw_bi_log_related_op. Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
adamemerson
left a comment
There was a problem hiding this comment.
I approve of this so far!
| int cls_obj_complete_op(BucketShard& bs, const rgw_obj& obj, RGWModifyOp op, string& tag, int64_t pool, uint64_t epoch, | ||
| rgw_bucket_dir_entry& ent, RGWObjCategory category, list<rgw_obj_index_key> *remove_objs, uint16_t bilog_flags, rgw_zone_set *zones_trace = nullptr); | ||
| int cls_obj_complete_add(BucketShard& bs, const rgw_obj& obj, string& tag, int64_t pool, uint64_t epoch, rgw_bucket_dir_entry& ent, | ||
| const rgw_bucket_dir_entry& ent, RGWObjCategory category, list<rgw_obj_index_key> *remove_objs, uint16_t bilog_flags, rgw_zone_set *zones_trace = nullptr); |
There was a problem hiding this comment.
A lot of stuff being mutable that didn't need to be was annoying me, so I appreciate this.
| // BILog as well? | ||
| // Liekly we would need to introduce use `bilog_rados->init()` | ||
| // as `datalog_rados` does with its `start()`. | ||
| bilog_rados = std::make_unique<RGWSI_BILog_RADOS>(cct); |
There was a problem hiding this comment.
I appreciate this elucidation of design inline.
| bucket_sync_sobj = std::make_unique<RGWSI_Bucket_Sync_SObj>(cct); | ||
| bi_rados = std::make_unique<RGWSI_BucketIndex_RADOS>(cct); | ||
| // Q: will we have the bucket layout available here? | ||
| // A: metadata log uses the `neorados` along the path to determine |
There was a problem hiding this comment.
We won't be using neorados in this run, though. The current plan is to use the interface in cls_fifo_legacy for ease of backporting, and then it can be updated to neorados for better Aio support later.
| { | ||
| constexpr bool is_inindex = true; | ||
| if (is_inindex) { | ||
| return std::move(on_flushed)( |
There was a problem hiding this comment.
Minor nit: Use std::forward here, not std::move.
| AioCompletion *rados_completion{nullptr}; | ||
| int manager_shard_id{-1}; | ||
| RGWIndexCompletionManager *manager{nullptr}; | ||
| std::function<void(librados::ObjectWriteOperation& o)> bi_update; |
There was a problem hiding this comment.
If you don't need to copy it, you might prefer fu2::unique_function, since then our functions can include unique_ptrs and other uncopyable stuff.
(unique_function will not be making it into C++20 because they couldn't agree on whether to rename it to any_invocable, apparently. Sheesh.)
| void RGWIndexCompletionManager::create_completion(const rgw_obj& obj, | ||
| RGWModifyOp op, string& tag, | ||
| static std::list<cls_rgw_obj_key> | ||
| maybe_copy_remove_objs(std::list<cls_rgw_obj_key>* const remove_objs) |
There was a problem hiding this comment.
If possible without gigantic scope creep, I would prefer to get rid of std::lists.
(But obviously getting things working quickly is a bigger priority.)
| remove_objs, | ||
| &arg); | ||
|
|
||
| // TODO: it would be really cool to knock the completion manager |
There was a problem hiding this comment.
This is the purpose of the async-work-to-be.
26e22b8 to
8f54ee4
Compare
|
Continuing in the |
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox