From 13afce83005997e2182657709b2159d7bea0655e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 7 Mar 2012 20:58:27 -0800 Subject: [PATCH] filestore: remove old post-idempotent transaction trigger_commit The old strategy was to initiate a commit after any non-idempotent transaction. This only worked if the transaction was idempotent with respect to itself, or could be replayed partially without problems, and in reality that isn't the case. For example: - clone A -> B - write to A - If we crash before the sync, and replay the clone A->B, we corrupt B with the new A data. Signed-off-by: Sage Weil --- src/os/FileStore.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 1cb30da9e2c93..4ee8cfd6c02ab 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -2765,10 +2765,6 @@ unsigned FileStore::_do_transaction(Transaction& t, uint64_t op_seq, int trans_n spos.op++; } - if (!idempotent && !btrfs_stable_commits) { - dout(10) << "performed non-idempotent operation and not using btrfs snaps, triggering a commit" << dendl; - trigger_commit(op_seq); - } return 0; // FIXME count errors } -- 2.39.5