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/11/17 17:07:36 UTC

usergrid git commit: Added logging to deletion task.

Repository: usergrid
Updated Branches:
  refs/heads/release ad12f3599 -> c44dfdabf


Added logging to deletion task.

Updated consistency test to have 2 read workers.


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

Branch: refs/heads/release
Commit: c44dfdabfc23db4e0d2eed739d19f865c58288cd
Parents: ad12f35
Author: Todd Nine <tn...@apigee.com>
Authored: Tue Nov 17 09:07:34 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
Committed: Tue Nov 17 09:07:34 2015 -0700

----------------------------------------------------------------------
 .../impl/shard/impl/ShardGroupDeletionImpl.java |  9 +++--
 .../graph/GraphManagerShardConsistencyIT.java   | 40 +++++++++++---------
 2 files changed, 28 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/c44dfdab/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 c460a5d..373d42b 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
@@ -138,6 +138,7 @@ public class ShardGroupDeletionImpl implements ShardGroupDeletion {
             return DeleteResult.COMPACTION_PENDING;
         }
 
+        logger.trace( "Shard group {} has no compaction pending", shardEntryGroup );
 
         final long currentTime = timeService.getCurrentTime();
 
@@ -146,6 +147,8 @@ public class ShardGroupDeletionImpl implements ShardGroupDeletion {
             return DeleteResult.TOO_NEW;
         }
 
+        logger.trace( "Shard group {} has passed the delta timeout at {}", shardEntryGroup, currentTime );
+
         /**
          * We have edges, and therefore cannot delete them
          */
@@ -156,6 +159,9 @@ public class ShardGroupDeletionImpl implements ShardGroupDeletion {
         }
 
 
+        logger.trace( "Shard group {} has no edges continuing to delete", shardEntryGroup, currentTime );
+
+
         //now we can proceed based on the shard meta state and we don't have any edge
 
         DeleteResult result = DeleteResult.NO_OP;
@@ -178,9 +184,6 @@ public class ShardGroupDeletionImpl implements ShardGroupDeletion {
             }
 
 
-            logger.info( "Deleting shard {} at time {}  ", shard, timeService.getCurrentTime() );
-
-
             final MutationBatch shardRemovalMutation =
                 edgeShardSerialization.removeShardMeta( applicationScope, shard, directedEdgeMeta );
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/c44dfdab/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerShardConsistencyIT.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerShardConsistencyIT.java b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerShardConsistencyIT.java
index a9f9cb7..b903c6c 100644
--- a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerShardConsistencyIT.java
+++ b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerShardConsistencyIT.java
@@ -266,31 +266,35 @@ public class GraphManagerShardConsistencyIT {
         final Meter readMeter = registry.meter( "readThroughput" );
 
 
-        /**
-         * Start reading continuously while we migrate data to ensure our view is always correct
-         */
-        final ListenableFuture<Long> future =
-            executor.submit( new ReadWorker( gmf, generator, writeCount, readMeter ) );
-
         final List<Throwable> failures = new ArrayList<>();
 
+        for(int i = 0; i < 2; i ++) {
 
-        //add the future
-        Futures.addCallback( future, new FutureCallback<Long>() {
 
-            @Override
-            public void onSuccess( @Nullable final Long result ) {
-                log.info( "Successfully ran the read, re-running" );
+            /**
+             * Start reading continuously while we migrate data to ensure our view is always correct
+             */
+            final ListenableFuture<Long> future =
                 executor.submit( new ReadWorker( gmf, generator, writeCount, readMeter ) );
-            }
 
 
-            @Override
-            public void onFailure( final Throwable t ) {
-                failures.add( t );
-                log.error( "Failed test!", t );
-            }
-        } );
+            //add the future
+            Futures.addCallback( future, new FutureCallback<Long>() {
+
+                @Override
+                public void onSuccess( @Nullable final Long result ) {
+                    log.info( "Successfully ran the read, re-running" );
+                    executor.submit( new ReadWorker( gmf, generator, writeCount, readMeter ) );
+                }
+
+
+                @Override
+                public void onFailure( final Throwable t ) {
+                    failures.add( t );
+                    log.error( "Failed test!", t );
+                }
+            } );
+        }
 
 
         int compactedCount;