From 5cbfeffd0b83fee955a311ecdfe7dc23d6a6f1a3 Mon Sep 17 00:00:00 2001 From: Jianpeng Ma Date: Fri, 26 Jan 2018 23:58:18 +0800 Subject: [PATCH] osd/ReplicatedBackend: clean up code. Signed-off-by: Jianpeng Ma --- src/osd/ReplicatedBackend.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/osd/ReplicatedBackend.cc b/src/osd/ReplicatedBackend.cc index de0175f6c0e..10a7aadaf69 100644 --- a/src/osd/ReplicatedBackend.cc +++ b/src/osd/ReplicatedBackend.cc @@ -1021,17 +1021,17 @@ void ReplicatedBackend::issue_op( InProgressOp *op, ObjectStore::Transaction &op_t) { - if (op->op) + if (op->op) { op->op->pg_trace.event("issue replication ops"); - - if (parent->get_actingbackfill_shards().size() > 1) { - ostringstream ss; - set replicas = parent->get_actingbackfill_shards(); - replicas.erase(parent->whoami_shard()); - ss << "waiting for subops from " << replicas; - if (op->op) + if (parent->get_actingbackfill_shards().size() > 1) { + ostringstream ss; + set replicas = parent->get_actingbackfill_shards(); + replicas.erase(parent->whoami_shard()); + ss << "waiting for subops from " << replicas; op->op->mark_sub_op_sent(ss.str()); + } } + for (set::const_iterator i = parent->get_actingbackfill_shards().begin(); i != parent->get_actingbackfill_shards().end(); -- 2.47.3