mirror of
https://github.com/ceph/ceph
synced 2025-02-15 23:07:55 +00:00
osdc/Objecter: resend ops on pg merge
This matches the split behavior. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
69873feb4a
commit
ae516076c2
@ -2906,12 +2906,15 @@ int Objecter::_calc_target(op_target_t *t, Connection *con, bool any_change)
|
||||
is_pg_changed(
|
||||
t->acting_primary, t->acting, acting_primary, acting,
|
||||
t->used_replica || any_change);
|
||||
bool split = false;
|
||||
bool split_or_merge = false;
|
||||
if (t->pg_num) {
|
||||
split = prev_pgid.is_split(t->pg_num, pg_num, nullptr);
|
||||
split_or_merge =
|
||||
prev_pgid.is_split(t->pg_num, pg_num, nullptr) ||
|
||||
prev_pgid.is_merge_source(t->pg_num, pg_num, nullptr) ||
|
||||
prev_pgid.is_merge_target(t->pg_num, pg_num);
|
||||
}
|
||||
|
||||
if (legacy_change || split || force_resend) {
|
||||
if (legacy_change || split_or_merge || force_resend) {
|
||||
t->pgid = pgid;
|
||||
t->acting = acting;
|
||||
t->acting_primary = acting_primary;
|
||||
@ -2977,7 +2980,7 @@ int Objecter::_calc_target(op_target_t *t, Connection *con, bool any_change)
|
||||
if (legacy_change || unpaused || force_resend) {
|
||||
return RECALC_OP_TARGET_NEED_RESEND;
|
||||
}
|
||||
if (split &&
|
||||
if (split_or_merge &&
|
||||
(osdmap->require_osd_release >= CEPH_RELEASE_LUMINOUS ||
|
||||
HAVE_FEATURE(osdmap->get_xinfo(acting_primary).features,
|
||||
RESEND_ON_SPLIT))) {
|
||||
|
Loading…
Reference in New Issue
Block a user