From: Sage Weil Date: Wed, 18 Apr 2018 13:01:19 +0000 (-0500) Subject: osd/osd_types: remove is_split assert X-Git-Tag: v14.0.1~371^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0a12da0e178c8a0218e3c6937b9272c67163cb9a;p=ceph.git osd/osd_types: remove is_split assert The problem is: osd is at epoch 80 import pg 1.a as of e57 1.a and 1.1a merged in epoch 60something we set up a merge now, but in should_restart_peering via advance_pg we hit the is_split assert that the ps is < old_pg_num We can meaningfully return false (this is not a split) for a pg that is beyond pg_num. Signed-off-by: Sage Weil --- diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index da8799ede1d6..37ed56cd382e 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -505,7 +505,11 @@ pg_t pg_t::get_ancestor(unsigned old_pg_num) const bool pg_t::is_split(unsigned old_pg_num, unsigned new_pg_num, set *children) const { - ceph_assert(m_seed < old_pg_num); + //ceph_assert(m_seed < old_pg_num); + if (m_seed >= old_pg_num) { + // degenerate case + return false; + } if (new_pg_num <= old_pg_num) return false;