]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/common/errorator: fix errorator::pass_further and discard_all
authorSamuel Just <sjust@redhat.com>
Fri, 17 Jan 2020 20:33:42 +0000 (12:33 -0800)
committerSamuel Just <sjust@redhat.com>
Sat, 15 Feb 2020 01:28:38 +0000 (17:28 -0800)
commitb2671e37eb6ba2023c6785a38326b837e3514236
tree0d69fbdc99d8a1430ea075b2f2058b319d8dec1f
parenta3bb1ddc601904e608fec2f8454f7b4edcf7d2cb
crimson/common/errorator: fix errorator::pass_further and discard_all

Previously, both of these were invocable on all errors, but would
static_assert on invalid ones.  What we actually want is for them
to only be invocable on valid errors.  That way, we can do, for
instance:

  }).handle_error(
    roll_journal_segment_ertr::pass_further{},
    SegmentManager::open_ertr::all_same_way([this](auto &&e) {
      logger().error(
"error {} in close segment {}",
e,
current_journal_segment_id);
      ceph_assert(0 == "error in close");
      return;
    })

to explicitely propogate any errors in roll_journal_segment_ertr
while asserting on anything else.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/common/errorator.h