You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by mr...@apache.org on 2016/06/24 17:52:52 UTC
[04/18] usergrid git commit: Add additional trace logging around
unique values for troubleshooting assistance.
Add additional trace logging around unique values for troubleshooting assistance.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/f4599fbe
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/f4599fbe
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/f4599fbe
Branch: refs/heads/master
Commit: f4599fbe42d9a1b82afdf9b6b99aab0077387eca
Parents: 57089ee
Author: Michael Russo <mr...@apigee.com>
Authored: Sun Jun 19 21:49:57 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Sun Jun 19 21:49:57 2016 -0700
----------------------------------------------------------------------
.../collection/mvcc/stage/write/WriteUniqueVerify.java | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/f4599fbe/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 2c47bdb..afe681e 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
@@ -213,6 +213,16 @@ public class WriteUniqueVerify implements Action1<CollectionIoEvent<MvccEntity>>
final Id returnedEntityId = uniqueValue.getEntityId();
if ( !entity.getId().equals(returnedEntityId) ) {
+
+ if(logger.isTraceEnabled()) {
+ logger.trace("Violation occurred when verifying unique value [{}={}]. Returned entity id [{}] " +
+ "does not match expected entity id [{}]",
+ field.getName(), field.getValue().toString(),
+ returnedEntityId,
+ entity.getId()
+ );
+ }
+
uniquenessViolations.put( field.getName(), field );
}
}