]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: wait for min_epoch instead of map_epoch 38127/head
authorKefu Chai <kchai@redhat.com>
Wed, 18 Nov 2020 10:34:38 +0000 (18:34 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 26 Nov 2020 12:13:48 +0000 (20:13 +0800)
osdmap_epoch is the latest osdmap of the client, it is not the minimum
osdmap epoch required to serve the request from the client with this
osdmap.

as a matter of fact, `MOSDOp` inherits from `MOSDFastDispatchOp`.
the `MOSDFastDispatchOp::get_min_epoch()` returns `get_map_epoch()`, and
`MOSDOp` does not override `get_min_epoch()`.

`ClientRequest` is designed to handle `MOSDOp`. so, there is no need
to wait for `m->get_map_epoch()` osdmap before moving further, and more
importantly, we should wait until PG is updated with min_epoch osdmap.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/osd_operations/client_request.cc

index f2fa0e2050759c28798342f5081254444ad9539e..fbd116b5f312652f44472c45b7ff2e87cf788647 100644 (file)
@@ -76,7 +76,7 @@ seastar::future<> ClientRequest::start()
          handle.enter(pp(pg).await_map)
        ).then([this, &pg]() mutable {
          return with_blocking_future(
-           pg.osdmap_gate.wait_for_map(m->get_map_epoch()));
+           pg.osdmap_gate.wait_for_map(m->get_min_epoch()));
        }).then([this, &pg](auto map) mutable {
          return with_blocking_future(
            handle.enter(pp(pg).wait_for_active));