d427ca3540 reversed the order of localt
and op_t, while some logic depends on the order of localt and op_t.

This commit revert d427ca3540.

Fix http://tracker.ceph.com/issues/10534.

Change-Id: I5adba561d10274e3d12f89418a755c39e5e5f086
Signed-off-by: Dong Yuan <yuandong1222@gmail.com>
This commit is contained in:
Dong Yuan 2015-01-20 09:23:53 +00:00 committed by Samuel Just
parent 46347fccc1
commit b1b299d337
2 changed files with 7 additions and 5 deletions

View File

@ -586,7 +586,9 @@ void ReplicatedBackend::submit_transaction(
trim_rollback_to,
true,
&local_t);
(*op_t).append(local_t);
local_t.append(*op_t);
local_t.swap(*op_t);
op_t->register_on_applied_sync(on_local_applied_sync);
op_t->register_on_applied(

View File

@ -8443,14 +8443,14 @@ void ReplicatedBackend::sub_op_modify_impl(OpRequestRef op)
op->mark_started();
rm->opt.append(rm->localt);
rm->opt.register_on_commit(
rm->localt.append(rm->opt);
rm->localt.register_on_commit(
parent->bless_context(
new C_OSD_RepModifyCommit(this, rm)));
rm->opt.register_on_applied(
rm->localt.register_on_applied(
parent->bless_context(
new C_OSD_RepModifyApply(this, rm)));
parent->queue_transaction(&(rm->opt), op);
parent->queue_transaction(&(rm->localt), op);
// op is cleaned up by oncommit/onapply when both are executed
}