From ba6668ed3190c8d159f09dfb09d6cdce298abf59 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 1 Sep 2018 15:48:37 -0500 Subject: [PATCH] osdc/Objecter: fix split vs reconnect race If we are reconnecting to an OSD, we may not have a connection established so this feature check is completely unreliable. If there happens to be a split, that could mean we don't resend an op that should have been resent. Instead, we can infer the OSD has the new behavior if require_osd_release is luminous or later. If not, we can look at the per-osd features in the OSDMap. Fixes: http://tracker.ceph.com/issues/22544 Signed-off-by: Sage Weil (cherry picked from commit 917fdbe5422d099902aaa08b3406efc0247ef155) --- src/osdc/Objecter.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index c7851e91c8e53..ddcf7a4c16593 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -2952,7 +2952,10 @@ 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 && con && con->has_features(CEPH_FEATUREMASK_RESEND_ON_SPLIT)) { + if (split && + (osdmap->require_osd_release >= CEPH_RELEASE_LUMINOUS || + HAVE_FEATURE(osdmap->get_xinfo(acting_primary).features, + RESEND_ON_SPLIT))) { return RECALC_OP_TARGET_NEED_RESEND; } return RECALC_OP_TARGET_NO_ACTION; -- 2.39.5