]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/osd_types: remove is_split assert
authorSage Weil <sage@redhat.com>
Wed, 18 Apr 2018 13:01:19 +0000 (08:01 -0500)
committerSage Weil <sage@redhat.com>
Fri, 7 Sep 2018 17:09:05 +0000 (12:09 -0500)
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 <sage@redhat.com>
src/osd/osd_types.cc

index da8799ede1d6db7fc407b57f484a3864c5d583ab..37ed56cd382e46cc9d7e4420e8c898d21675e9f6 100644 (file)
@@ -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<pg_t> *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;