Repository navigation
Conversation
5a7e69f to
12a8a6f
Compare
12a8a6f to
4beeb92
Compare
4beeb92 to
bdf26a8
Compare
798216e to
cd74662
Compare
|
@cbodley, pushed changes addressing most of the comments. Could you please review? |
cd74662 to
9435822
Compare
e6b60da to
a0b49ba
Compare
a0b49ba to
63fef4f
Compare
commented
Jul 23, 2020
|
@cbodley addressed some comments in the last three commits. Can you please review them? |
63fef4f to
2b558bf
Compare
left a comment
There was a problem hiding this comment.
I believe there are some left-over comments near line #1117 of rgw_common.h.
| bucket_objects[0] = bucket_oid_base; | ||
| } else { | ||
| char buf[bucket_oid_base.size() + 32]; | ||
| char buf[bucket_oid_base.size() + 64]; |
There was a problem hiding this comment.
Would a std::stringstream work better here? Array of chars + snprintf seems so clunky, especially given that the result will ultimately go into a std::string.
| encode_json("tenant", tenant, f); | ||
| encode_json("bucket_name", bucket_name, f); | ||
| encode_json("bucket_id", bucket_id, f); | ||
| encode_json("new_instance_id", new_instance_id, f); |
There was a problem hiding this comment.
Do we need to preserve a backward compatibility here?
| { | ||
| encode_json("reshard_status", to_string(reshard_status), f); | ||
| encode_json("new_bucket_instance_id", new_bucket_instance_id, f); | ||
| encode_json("bucket_instance_id", bucket_instance_id, f); |
There was a problem hiding this comment.
Same question about backward compatibility here.
| cls_rgw_reshard_status reshard_status{cls_rgw_reshard_status::NOT_RESHARDING}; | ||
| string new_bucket_instance_id; | ||
| rgw::BucketReshardState reshard_status{rgw::BucketReshardState::NOT_RESHARDING}; | ||
| string bucket_instance_id; |
There was a problem hiding this comment.
| string bucket_instance_id; | |
| std::string bucket_instance_id; |
nit: let's not rely on namespace inclusion in headers.
| encode_json("mdsearch_config", mdsearch_config, f); | ||
| encode_json("reshard_status", (int)reshard_status, f); | ||
| encode_json("new_bucket_instance_id", new_bucket_instance_id, f); | ||
| encode_json("bucket_instance_id", bucket_instance_id, f); |
There was a problem hiding this comment.
Backward compatibility? Do we need to worry about that when working with JSONs?
| int shard_id = (bucket_info.layout.current_index.layout.normal.num_shards > 0 ? i : -1); | ||
| const auto& current = bucket_info.layout.current_index; | ||
| int ret = bs.init(bucket, shard_id, current, nullptr /* no RGWBucketInfo */); | ||
| int ret = bs.init(bucket, shard_id, current, std::nullopt, nullptr /* no RGWBucketInfo */); |
7829051 to
e58da6f
Compare
3881d0a to
b6c85f1
Compare
commented
Sep 21, 2020
Thanks, I have fixed it. |
Signed-off-by: Shilpa Jagannath <[email protected]>
Signed-off-by: Shilpa Jagannath <[email protected]>
…s a parameter. Signed-off-by: Shilpa Jagannath <[email protected]>
…tions.
- call init_index() on target layout during reshard process.
Takes const rgw::bucket_index_layout_generation&
Signed-off-by: Shilpa Jagannath <[email protected]>
- fix bi_get() to get objects after being resharded Signed-off-by: Shilpa Jagannath <[email protected]>
Signed-off-by: Shilpa Jagannath <[email protected]>
Signed-off-by: Shilpa Jagannath <[email protected]>
Signed-off-by: Shilpa Jagannath <[email protected]>
Signed-off-by: Shilpa Jagannath <[email protected]>
Signed-off-by: Shilpa Jagannath <[email protected]>
…stance_id and new_instance_id fields back for proper decoding. Signed-off-by: Shilpa Jagannath <[email protected]>
Signed-off-by: Shilpa Jagannath <[email protected]>
- function update_bucket() handles updating bucket state Signed-off-by: Shilpa Jagannath <[email protected]>
5b4fdb0 to
5517551
Compare
commented
Oct 6, 2020
|
@smanjara have you managed to integrate the FaultInjector stuff for testing? i'd really like to see test cases using that as part of this work |
commented
Oct 6, 2020
@cbodley I was under the impression that it was supposed to be used for local testing. Will write some test cases. Thanks! |
commented
Oct 6, 2020
|
thanks @smanjara! i think this automated test coverage is important, first to give us confidence that we got things right, and second for regression testing to make sure we don't break things. to recap, i'd like to see two tests cases around each step of the reshard process (one injecting an error, and another injecting a crash), showing we can recover from each - meaning we can both write a new object, and reshard successfully cc @ivancich, since you did a lot of work on the recovery and error handling here, i could really use your help with review! |
commented
Oct 6, 2020
commented
Oct 7, 2020
Signed-off-by: Casey Bodley <[email protected]>
1cc6d45 to
4305ea7
Compare
Signed-off-by: Shilpa Jagannath <[email protected]>
4305ea7 to
ae18662
Compare
commented
Oct 28, 2020
|
@cbodley Initial results from a single run (search for --inject): After a crash, the reshard lock is held on the bucket for a default time of 360 seconds. Is that intentional? @ivancich can you weigh in? |
commented
Nov 2, 2020
|
Reduced the default reshard lock value and re-ran the test |
commented
Nov 12, 2020
commented
Dec 16, 2020
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
With these changes dynamic resharding does not require a new bucket instance anymore, thus facilitating the upcoming multisite support use case.
In continuation with #34096 and #34352, a property called bucket layout is introduced in RGWBucketInfo. With every reshard process, the bucket index transitions from current_index to target_index layout and each can have its own properties like BucketIndexType and BucketHashType. To do this, it maintains a generation number that is incremented in every reshard cycle.
This PR is part of multisite work documented in:
https://github.com/ceph/ceph/blob/master/src/doc/rgw/multisite-reshard.md#bucket-index-resharding