From cbbd74558bbe0dace86116c4e4358a7852e625bf Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 18 Nov 2020 18:34:38 +0800 Subject: [PATCH] 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 --- src/crimson/osd/osd_operations/client_request.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- 2.47.3