You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by to...@apache.org on 2015/10/22 22:14:46 UTC

usergrid git commit: Added trace statements to the shard group deletion

Repository: usergrid
Updated Branches:
  refs/heads/2.1-release 0604247f6 -> db852d0a1


Added trace statements to the shard group deletion


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

Branch: refs/heads/2.1-release
Commit: db852d0a1d00f8ea89eddb82d4075b1b774d9673
Parents: 0604247
Author: Todd Nine <tn...@apigee.com>
Authored: Thu Oct 22 14:14:43 2015 -0600
Committer: Todd Nine <tn...@apigee.com>
Committed: Thu Oct 22 14:14:43 2015 -0600

----------------------------------------------------------------------
 .../impl/shard/impl/ShardGroupDeletionImpl.java          | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/db852d0a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java
index 38a7834..6d2a009 100644
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java
@@ -125,10 +125,13 @@ public class ShardGroupDeletionImpl implements ShardGroupDeletion {
                                                    final ShardEntryGroup shardEntryGroup,
                                                    final Iterator<MarkedEdge> edgeIterator ) {
 
+        logger.trace( "Beginning audit of shard group {}", shardEntryGroup );
+
         /**
          * Compaction is pending, we cannot check it
          */
         if ( shardEntryGroup.isCompactionPending() ) {
+            logger.trace( "Shard group {} is compacting, not auditing group", shardEntryGroup );
             return DeleteResult.COMPACTION_PENDING;
         }
 
@@ -136,6 +139,7 @@ public class ShardGroupDeletionImpl implements ShardGroupDeletion {
         final long currentTime = timeService.getCurrentTime();
 
         if ( shardEntryGroup.isNew( currentTime ) ) {
+            logger.trace( "Shard group {} contains a shard that is is too new, not auditing group", shardEntryGroup );
             return DeleteResult.TOO_NEW;
         }
 
@@ -143,6 +147,8 @@ public class ShardGroupDeletionImpl implements ShardGroupDeletion {
          * We have edges, and therefore cannot delete them
          */
         if ( edgeIterator.hasNext() ) {
+            logger.trace( "Shard group {} has edges, not deleting", shardEntryGroup );
+
             return DeleteResult.CONTAINS_EDGES;
         }
 
@@ -157,6 +163,7 @@ public class ShardGroupDeletionImpl implements ShardGroupDeletion {
 
             //skip the min shard
             if(shard.isMinShard()){
+                logger.trace( "Shard {} in group {} is the minimum, not deleting", shard, shardEntryGroup );
                 continue;
             }
 
@@ -173,6 +180,8 @@ public class ShardGroupDeletionImpl implements ShardGroupDeletion {
             }
 
             result = DeleteResult.DELETED;
+
+            logger.trace( "Removing shard {} in group {}", shard, shardEntryGroup );
         }
 
 
@@ -187,6 +196,8 @@ public class ShardGroupDeletionImpl implements ShardGroupDeletion {
            }
        }
 
+        logger.trace( "Completed auditing shard group {}", shardEntryGroup );
+
         return result;
     }