You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2014/03/12 20:23:47 UTC

[3/4] git commit: Operation now removes self from log instead of writing a rollback entry.

Operation now removes self from log instead of writing a rollback entry.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/f7a50720
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/f7a50720
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/f7a50720

Branch: refs/pull/52/merge
Commit: f7a5072003ec00a250a8131a4deee845e7e7cfd9
Parents: 29a4966
Author: Dave Johnson <dm...@apigee.com>
Authored: Wed Mar 12 14:20:49 2014 -0400
Committer: Dave Johnson <dm...@apigee.com>
Committed: Wed Mar 12 14:20:49 2014 -0400

----------------------------------------------------------------------
 .../collection/mvcc/stage/write/WriteOptimisticVerify.java     | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f7a50720/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteOptimisticVerify.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteOptimisticVerify.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteOptimisticVerify.java
index 061595c..9b04bd1 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteOptimisticVerify.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteOptimisticVerify.java
@@ -96,11 +96,9 @@ public class WriteOptimisticVerify
                 log.debug("Conflict writing entity id {} version {}", 
                     entity.getId().toString(), entity.getVersion().toString());
             
-                // We're not the first writer, set ROLLBACK, cleanup and throw exception
+                // We're not the first writer, cleanup and throw exception
 
-                final MvccLogEntry rollbackEntry = 
-                    new MvccLogEntryImpl( entity.getId(), entity.getVersion(), Stage.ROLLBACK);
-                logEntryStrat.write( collectionScope, rollbackEntry );
+                logEntryStrat.delete( collectionScope, entity.getId(), entity.getVersion() );
 
                 // Delete all unique values of entity, and do it concurrently