Updated Branches: refs/heads/helix-0.6.2-release 73bacfda0 -> f678f79f3
[HELIX-350]cluster status monitor should not be reset in FINALIZE type pipeline,rb=16772 Project: http://git-wip-us.apache.org/repos/asf/helix/repo Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/f678f79f Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/f678f79f Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/f678f79f Branch: refs/heads/helix-0.6.2-release Commit: f678f79f34be5061c91a687b7ff826198d1daca9 Parents: 73bacfd Author: slu2011 <[email protected]> Authored: Fri Jan 10 16:31:40 2014 -0800 Committer: slu2011 <[email protected]> Committed: Fri Jan 10 16:31:40 2014 -0800 ---------------------------------------------------------------------- .../helix/controller/GenericHelixController.java | 13 +++++++------ .../participant/DistClusterControllerElection.java | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/helix/blob/f678f79f/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java ---------------------------------------------------------------------- diff --git a/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java b/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java index 7a8b609..3b522e6 100644 --- a/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java +++ b/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java @@ -259,11 +259,6 @@ public class GenericHelixController implements ConfigChangeListener, IdealStateC // Initialize _clusterStatusMonitor if (context != null) { if (context.getType() == Type.FINALIZE) { - if (_clusterStatusMonitor != null) { - _clusterStatusMonitor.reset(); - _clusterStatusMonitor = null; - } - stopRebalancingTimer(); logger.info("Get FINALIZE notification, skip the pipeline. Event :" + event.getName()); return; @@ -542,5 +537,11 @@ public class GenericHelixController implements ConfigChangeListener, IdealStateC _lastSeenSessions.set(curSessions); } - + public void shutdownClusterStatusMonitor(String clusterName) { + if (_clusterStatusMonitor != null) { + logger.info("Shut down _clusterStatusMonitor for cluster " + clusterName); + _clusterStatusMonitor.reset(); + _clusterStatusMonitor = null; + } + } } http://git-wip-us.apache.org/repos/asf/helix/blob/f678f79f/helix-core/src/main/java/org/apache/helix/participant/DistClusterControllerElection.java ---------------------------------------------------------------------- diff --git a/helix-core/src/main/java/org/apache/helix/participant/DistClusterControllerElection.java b/helix-core/src/main/java/org/apache/helix/participant/DistClusterControllerElection.java index 25aada2..80cfb10 100644 --- a/helix-core/src/main/java/org/apache/helix/participant/DistClusterControllerElection.java +++ b/helix-core/src/main/java/org/apache/helix/participant/DistClusterControllerElection.java @@ -100,6 +100,7 @@ public class DistClusterControllerElection implements ControllerChangeListener { if (_leader != null) { _leader.disconnect(); } + _controller.shutdownClusterStatusMonitor(manager.getClusterName()); } } catch (Exception e) {
