]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson: do not assert in start_backfill_ops
authorXuehan Xu <xxhdx1985126@163.com>
Mon, 8 Jun 2020 06:41:06 +0000 (14:41 +0800)
committerXuehan Xu <xxhdx1985126@163.com>
Thu, 18 Jun 2020 01:50:52 +0000 (09:50 +0800)
osd_recovery_max_single_start is not necessarily used up in start_recovery_ops, and
start_backfill_ops could be invoked even there's no need to backfill, so do not assert
here, just return.

Signed-off-by: Xuehan Xu <xxhdx1985126@163.com>
src/crimson/osd/pg_recovery.cc

index a77f67ccfe1cf7526db7a8d85ac169559da56b5f..f954d4553ecff7821585121e06122cd89a89a6fc 100644 (file)
@@ -259,8 +259,8 @@ size_t PGRecovery::start_backfill_ops(
   size_t max_to_start,
   std::vector<crimson::osd::blocking_future<>> *out)
 {
-  assert(!pg->get_peering_state().get_backfill_targets().empty());
-
+  if (pg->get_peering_state().get_backfill_targets().empty())
+    return 0;
   ceph_abort("not implemented!");
 }