]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw/reshard: Backward Compatibility
authorliangmingyuan <liangmingyuan@baidu.com>
Fri, 22 Mar 2024 01:13:09 +0000 (09:13 +0800)
committerliangmingyuan <liangmingyuan@baidu.com>
Mon, 22 Jul 2024 01:19:25 +0000 (09:19 +0800)
commit5e7de76407c6f782f1aa5e53376669bbe4689ade
treee8a859417c34c84710016dfbf9fe633386f918b4
parentf19347d43b7cd4bb1e009e66305f6e736c4c5d89
rgw/reshard: Backward Compatibility

The privious release only has one reshard phase: the progress phase
which will block client writes. Because our release contains this
phase and the process is same too, that means it is superset of
privious release. So when privious rgw initiates a reshard, it will
execute as before.
When a updated rgw initiates a reshard, it firstly enter the
logrecord phase which privious releases do not realized. That means
the nodes which do not upgraded will deal with client write
operations without recording logs. It may leads to part of these
index entries missed. So we forbit this scene by adding
`cls_rgw_set_bucket_resharding2()` and `cls_rgw_bucket_init_index2()`
control source and target versions, old osds would fail the request
with -EOPNOTSUPP. so radosgw could start by trying that on all
shards. if there are no errors, it can safely proceed with the new
scheme. If any of the osds do return -EOPNOTSUPP there, then rgw
fall back to the current resharding scheme where writes are blocked
the whole time.

Signed-off-by: Mingyuan Liang <liangmingyuan@baidu.com>
14 files changed:
src/cls/rgw/cls_rgw.cc
src/cls/rgw/cls_rgw_client.cc
src/cls/rgw/cls_rgw_client.h
src/cls/rgw/cls_rgw_const.h
src/cls/rgw/cls_rgw_types.h
src/rgw/driver/rados/rgw_rados.cc
src/rgw/driver/rados/rgw_rados.h
src/rgw/driver/rados/rgw_reshard.cc
src/rgw/driver/rados/rgw_reshard.h
src/rgw/rgw_bucket_layout.h
src/rgw/services/svc_bi.h
src/rgw/services/svc_bi_rados.cc
src/rgw/services/svc_bi_rados.h
src/test/cls_rgw/test_cls_rgw.cc