Merge pull request #20127 from majianpeng/issue_op_cleanup

osd/ReplicatedBackend: clean up code.

Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2018-01-29 18:37:38 +08:00 committed by GitHub
commit 3e3e781600
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<pg_shard_t> 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<pg_shard_t> 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<pg_shard_t>::const_iterator i =
parent->get_actingbackfill_shards().begin();
i != parent->get_actingbackfill_shards().end();