]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore: remove old post-idempotent transaction trigger_commit
authorSage Weil <sage.weil@dreamhost.com>
Thu, 8 Mar 2012 04:58:27 +0000 (20:58 -0800)
committerSage Weil <sage@newdream.net>
Sat, 10 Mar 2012 00:32:23 +0000 (16:32 -0800)
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
 - <sync>

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 <sage.weil@dreamhost.com>
src/os/FileStore.cc

index 1cb30da9e2c93a3c862536bfd861ac7baf27280e..4ee8cfd6c02ab7e16e64a76069261f81f7299ca7 100644 (file)
@@ -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
 }