From: Kefu Chai Date: Wed, 18 Nov 2020 10:34:38 +0000 (+0800) Subject: crimson/osd: wait for min_epoch instead of map_epoch X-Git-Tag: v16.1.0~438^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F38127%2Fhead;p=ceph.git crimson/osd: wait for min_epoch instead of map_epoch 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 --- diff --git a/src/crimson/osd/osd_operations/client_request.cc b/src/crimson/osd/osd_operations/client_request.cc index f2fa0e205075..fbd116b5f312 100644 --- a/src/crimson/osd/osd_operations/client_request.cc +++ b/src/crimson/osd/osd_operations/client_request.cc @@ -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));