usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mru...@apache.org
Subject [19/50] usergrid git commit: Add additional logging during write unique verification.
Date Thu, 14 Jul 2016 05:38:25 GMT
Add additional logging during write unique verification.


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

Branch: refs/heads/master
Commit: 57231f0d6594916faa459164cabbce9bfb9ffa4d
Parents: b0c3059
Author: Michael Russo <mrusso@apigee.com>
Authored: Thu Jun 30 21:05:35 2016 -0700
Committer: Michael Russo <mrusso@apigee.com>
Committed: Thu Jun 30 21:05:35 2016 -0700

----------------------------------------------------------------------
 .../collection/mvcc/stage/write/WriteUniqueVerify.java  | 12 ++++++++++++
 .../impl/UniqueValueSerializationStrategyImpl.java      |  3 ++-
 2 files changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/57231f0d/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
index 0ebb6a1..7f32888 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
@@ -131,6 +131,18 @@ public class WriteUniqueVerify implements Action1<CollectionIoEvent<MvccEntity>>
 
                     if(!uniqueValue.getEntityId().getUuid().equals(written.getEntityId().getUuid())){
 
+                        if(logger.isTraceEnabled()){
+                            logger.trace("Pre-write violation detected. Attempted write for
unique value [{}={}] and" +
+                                "entity id [{}], entity version [{}] conflicts with already
existing entity id [{}], " +
+                                "entity version [{}]",
+                                written.getField().getName(),
+                                written.getField().getValue().toString(),
+                                written.getEntityId().getUuid(),
+                                written.getEntityVersion(),
+                                uniqueValue.getEntityId().getUuid(),
+                                uniqueValue.getEntityVersion());
+                        }
+
                         preWriteUniquenessViolations.put(field.getName(), field);
 
                     }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/57231f0d/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
index ce1f20e..f37e219 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
@@ -358,7 +358,8 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey,
EntityKey>
                                 delete(appScope, candidate).execute();
 
                             } catch (ConnectionException e) {
-                                // do nothing for now
+                               logger.error( "Unable to connect to cassandra during duplicate
repair of [{}={}]",
+                                   field.getName(), field.getValue().toString() );
                             }
 
                         });


Mime
View raw message