usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mru...@apache.org
Subject usergrid git commit: Add more logging to unique value serialization.
Date Sun, 03 Jul 2016 17:52:50 GMT
Repository: usergrid
Updated Branches:
  refs/heads/release-2.1.1 ada914ac3 -> e0a5d9811


Add more logging to unique value serialization.


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

Branch: refs/heads/release-2.1.1
Commit: e0a5d9811f7851263336c04302b0208c64573a73
Parents: ada914a
Author: Michael Russo <mrusso@apigee.com>
Authored: Sun Jul 3 10:52:31 2016 -0700
Committer: Michael Russo <mrusso@apigee.com>
Committed: Sun Jul 3 10:52:31 2016 -0700

----------------------------------------------------------------------
 .../mvcc/stage/write/WriteUniqueVerify.java     |  2 +-
 .../UniqueValueSerializationStrategyImpl.java   | 22 ++++++++++++++++++++
 2 files changed, 23 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/e0a5d981/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 538160a..53160dc 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
@@ -132,7 +132,7 @@ 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" +
+                            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(),

http://git-wip-us.apache.org/repos/asf/usergrid/blob/e0a5d981/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 8f304f3..8c1f2d2 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
@@ -278,6 +278,12 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey,
EntityKey>
                 .withColumnRange(new RangeBuilder().setLimit(serializationFig.getMaxLoadSize()).build())
                 .execute().getResult().iterator();
 
+        if( !results.hasNext()){
+            if(logger.isTraceEnabled()){
+                logger.trace("No partitions returned for unique value lookup");
+            }
+        }
+
 
         while ( results.hasNext() )
 
@@ -291,6 +297,10 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey,
EntityKey>
 
             //sanity check, nothing to do, skip it
             if ( !columnList.hasNext() ) {
+                if(logger.isTraceEnabled()){
+                    logger.trace("No cells exist in partition for unique value [{}={}]",
+                        field.getName(), field.getValue().toString());
+                }
                 continue;
             }
 
@@ -317,12 +327,24 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey,
EntityKey>
                 // set the initial candidate and move on
                 if (candidates.size() == 0) {
                     candidates.add(uniqueValue);
+
+                    if (logger.isTraceEnabled()) {
+                        logger.trace("First entry for unique value [{}={}] found for application
[{}], adding " +
+                                "entry with entity id [{}] and entity version [{}] to the
candidate list and continuing",
+                            field.getName(), field.getValue().toString(), applicationId.getType(),
+                            uniqueValue.getEntityId().getUuid(), uniqueValue.getEntityVersion());
+                    }
+
                     continue;
                 }
 
                 if(!useReadRepair){
 
                     // take only the first
+                    if (logger.isTraceEnabled()) {
+                        logger.trace("Read repair not enabled for this request of unique
value [{}={}], breaking out" +
+                            " of cell loop", field.getName(), field.getValue().toString());
+                    }
                     break;
 
                 } else {


Mime
View raw message