]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: drop repop if it can be discarded
authorXuehan Xu <xxhdx1985126@gmail.com>
Tue, 8 Sep 2020 04:36:06 +0000 (12:36 +0800)
committerXuehan Xu <xxhdx1985126@gmail.com>
Tue, 8 Sep 2020 04:36:06 +0000 (12:36 +0800)
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
src/crimson/osd/pg.cc

index f1358ce4dfdba931be5243da42ff4a63f441b4ed..ca99a4b99966adb5ab396752d029e2f71ad29bba 100644 (file)
@@ -908,6 +908,10 @@ seastar::future<> PG::handle_rep_op(Ref<MOSDRepOp> req)
        crimson::common::system_shutdown_exception());
   }
 
+  if (can_discard_replica_op(*req)) {
+    return seastar::now();
+  }
+
   ceph::os::Transaction txn;
   auto encoded_txn = req->get_data().cbegin();
   decode(txn, encoded_txn);