diff options
author | Samuel Just <sjust@redhat.com> | 2024-10-10 02:42:36 +0200 |
---|---|---|
committer | Samuel Just <sjust@redhat.com> | 2024-11-07 19:29:42 +0100 |
commit | 293679dbb5d50e59d400e0929b42fc83e763f176 (patch) | |
tree | 24d5ba3cee45fb7ba32b62d1ed696750b901bbda | |
parent | crimson/.../client_request: remove unnecessary get_handle().exit() (diff) | |
download | ceph-293679dbb5d50e59d400e0929b42fc83e763f176.tar.xz ceph-293679dbb5d50e59d400e0929b42fc83e763f176.zip |
crimson/.../client_request: always remove from orderer in complete_request
Signed-off-by: Samuel Just <sjust@redhat.com>
-rw-r--r-- | src/crimson/osd/osd_operations/client_request.cc | 16 | ||||
-rw-r--r-- | src/crimson/osd/osd_operations/client_request.h | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/crimson/osd/osd_operations/client_request.cc b/src/crimson/osd/osd_operations/client_request.cc index 38960b675ad..368ee4eb2a2 100644 --- a/src/crimson/osd/osd_operations/client_request.cc +++ b/src/crimson/osd/osd_operations/client_request.cc @@ -43,15 +43,17 @@ void ClientRequest::Orderer::clear_and_cancel(PG &pg) { LOG_PREFIX(ClientRequest::Orderer::clear_and_cancel); for (auto i = list.begin(); i != list.end(); ) { - DEBUGDPP("{}", pg, *i); - i->complete_request(); - remove_request(*(i++)); + auto &req = *i; + DEBUGDPP("{}", pg, req); + ++i; + req.complete_request(pg); } } -void ClientRequest::complete_request() +void ClientRequest::complete_request(PG &pg) { track_event<CompletionEvent>(); + pg.client_request_orderer.remove_request(*this); on_complete.set_value(); } @@ -152,8 +154,7 @@ ClientRequest::interruptible_future<> ClientRequest::with_pg_process_interruptib std::ref(get_foreign_connection()), m->get_map_epoch() )); DEBUGDPP("{}: discarding {}", *pgref, *this, this_instance_id); - pgref->client_request_orderer.remove_request(*this); - complete_request(); + complete_request(pg); co_return; } DEBUGDPP("{}.{}: entering await_map stage", @@ -242,8 +243,7 @@ ClientRequest::interruptible_future<> ClientRequest::with_pg_process_interruptib DEBUGDPP("{}.{}: process[_pg]_op complete," "removing request from orderer", *pgref, *this, this_instance_id); - pgref->client_request_orderer.remove_request(*this); - complete_request(); + complete_request(pg); } seastar::future<> ClientRequest::with_pg_process( diff --git a/src/crimson/osd/osd_operations/client_request.h b/src/crimson/osd/osd_operations/client_request.h index 9df33127fb0..6d1043e2783 100644 --- a/src/crimson/osd/osd_operations/client_request.h +++ b/src/crimson/osd/osd_operations/client_request.h @@ -210,7 +210,7 @@ public: void requeue(Ref<PG> pg); void clear_and_cancel(PG &pg); }; - void complete_request(); + void complete_request(PG &pg); static constexpr OperationTypeCode type = OperationTypeCode::client_request; |