From: chunmei-liu Date: Tue, 29 Jun 2021 05:20:55 +0000 (-0700) Subject: crimson: fix pgnls exception X-Git-Tag: v17.1.0~1538^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F42076%2Fhead;p=ceph.git crimson: fix pgnls exception has_pg_op is always false, since m->ops is empty at that time. so pgnls operation will go to process_op and report unknown operations. move m->finish_decode ahead to fill m->ops. Signed-off-by: chunmei-liu --- diff --git a/src/crimson/osd/osd_operations/client_request.cc b/src/crimson/osd/osd_operations/client_request.cc index 2244791ffe4c..2de452cb5161 100644 --- a/src/crimson/osd/osd_operations/client_request.cc +++ b/src/crimson/osd/osd_operations/client_request.cc @@ -87,6 +87,9 @@ seastar::future<> ClientRequest::start() return interruptor::with_interruption([this, pgref]() mutable { epoch_t same_interval_since = pgref->get_interval_start_epoch(); logger().debug("{} same_interval_since: {}", *this, same_interval_since); + if (m->finish_decode()) { + m->clear_payload(); + } const bool has_pg_op = is_pg_op(); auto interruptible_do_op = interruptor::wrap_function([=] { PG &pg = *pgref; @@ -108,9 +111,6 @@ seastar::future<> ClientRequest::start() }).then_interruptible([this, has_pg_op, pgref=std::move(pgref)]() mutable { - if (m->finish_decode()) { - m->clear_payload(); - } return (has_pg_op ? process_pg_op(pgref) : process_op(pgref));