]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson: futures from flush_changes_n_do_ops_effects must not fail
authorSamuel Just <sjust@redhat.com>
Fri, 20 Sep 2024 02:23:47 +0000 (02:23 +0000)
committerSamuel Just <sjust@redhat.com>
Tue, 15 Oct 2024 03:37:26 +0000 (20:37 -0700)
commit24b7b4f4b5d53927d5cc6689fd0ca1ec2276a5f3
tree4ba44c1361ffe6c6f8d26ad74863c6190e9d4fd5
parenta43452f47ee6f2eb7e2496ee242848acba8f8472
crimson: futures from flush_changes_n_do_ops_effects must not fail

The return signature previously suggested that the second future
returned could be an error.  This seemed necessary due to how
effects are handled:

template <typename MutFunc>
OpsExecuter::rep_op_fut_t
OpsExecuter::flush_changes_n_do_ops_effects(
  const std::vector<OSDOp>& ops,
  SnapMapper& snap_mapper,
  OSDriver& osdriver,
  MutFunc mut_func) &&
{
...
    all_completed =
      std::move(all_completed).then_interruptible([this, pg=this->pg] {
      // let's do the cleaning of `op_effects` in destructor
      return interruptor::do_for_each(op_effects,
        [pg=std::move(pg)](auto& op_effect) {
        return op_effect->execute(pg);
      });

However, all of the actual execute implementations (created via
OpsExecuter::with_effect_on_obc) return a bare seastar::future and
cannot fail.

In a larger sense, it's actually critical that neither future returned
from flush_changes_n_do_ops_effects may fail -- they represent applying
the transaction locally and remotely.  If either portion fails, there
would need to be an interval change to recover.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/osd/ops_executer.h
src/crimson/osd/pg.cc