]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: resend ops on pg merge
authorSage Weil <sage@redhat.com>
Fri, 27 Jul 2018 22:12:59 +0000 (17:12 -0500)
committerSage Weil <sage@redhat.com>
Fri, 7 Sep 2018 17:09:05 +0000 (12:09 -0500)
This matches the split behavior.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osdc/Objecter.cc

index f9178ab8afb066d73f8d4ed46e34eeb6a4f7b519..1a85ed1b0cb75e97bc71715d92e98c86c863f44a 100644 (file)
@@ -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))) {