Michael Blow has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/1803

Change subject: Minor cleanup, no PENDING on cluster state refresh
......................................................................

Minor cleanup, no PENDING on cluster state refresh

Change-Id: I34221471f9aafa4ae970b2f44f80577ebb8bbba7
---
M 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/ClusterStateManager.java
1 file changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/03/1803/1

diff --git 
a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/ClusterStateManager.java
 
b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/ClusterStateManager.java
index 64ef5c2..37b3cc2 100644
--- 
a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/ClusterStateManager.java
+++ 
b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/ClusterStateManager.java
@@ -164,17 +164,18 @@
             }
         }
 
-        setState(ClusterState.PENDING);
-        LOGGER.info("Cluster is now " + state);
-
         // if all storage partitions are active as well as the metadata node, 
then the cluster is active
         if (metadataNodeActive) {
+            if (state != ClusterState.ACTIVE) {
+                setState(ClusterState.PENDING);
+            }
             appCtx.getMetadataBootstrap().init();
             setState(ClusterState.ACTIVE);
-            LOGGER.info("Cluster is now " + state);
             notifyAll();
             // start global recovery
             appCtx.getGlobalRecoveryManager().startGlobalRecovery(appCtx);
+        } else {
+            setState(ClusterState.PENDING);
         }
     }
 
@@ -377,7 +378,7 @@
     public synchronized void deregisterNodePartitions(String nodeId) {
         ClusterPartition [] nodePartitions = node2PartitionsMap.remove(nodeId);
         if (LOGGER.isLoggable(Level.INFO)) {
-            LOGGER.info("Deegistering node partitions for node " + nodeId + ": 
" + Arrays.toString(nodePartitions));
+            LOGGER.info("Deregistering node partitions for node " + nodeId + 
": " + Arrays.toString(nodePartitions));
         }
         for (ClusterPartition nodePartition : nodePartitions) {
             clusterPartitions.remove(nodePartition.getPartitionId());

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1803
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I34221471f9aafa4ae970b2f44f80577ebb8bbba7
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <[email protected]>

Reply via email to