ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject ignite git commit: Update notifier fixes
Date Fri, 15 Jan 2016 07:04:34 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1.5.4 cc3db3592 -> a5c85ca77


Update notifier fixes


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

Branch: refs/heads/ignite-1.5.4
Commit: a5c85ca7749ae90af2e4a29e2162713b480e40fa
Parents: cc3db35
Author: Valentin Kulichenko <valentin.kulichenko@gmail.com>
Authored: Thu Jan 14 22:58:41 2016 -0800
Committer: Valentin Kulichenko <valentin.kulichenko@gmail.com>
Committed: Thu Jan 14 22:58:41 2016 -0800

----------------------------------------------------------------------
 .../org/apache/ignite/internal/IgniteKernal.java    |  4 ++--
 .../processors/cluster/ClusterProcessor.java        | 16 +++++++++++++---
 2 files changed, 15 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a5c85ca7/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index d011d1f..6bba502 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -769,8 +769,6 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
 
             startProcessor(clusterProc);
 
-            fillNodeAttributes(clusterProc.updateNotifierEnabled());
-
             U.onGridStart();
 
             // Start and configure resource processor first as it contains resources used
@@ -871,6 +869,8 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
                 provider.start(ctx.plugins().pluginContextForProvider(provider));
             }
 
+            fillNodeAttributes(clusterProc.updateNotifierEnabled());
+
             gw.writeLock();
 
             try {

http://git-wip-us.apache.org/repos/asf/ignite/blob/a5c85ca7/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/ClusterProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/ClusterProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/ClusterProcessor.java
index 5e8e98d..0ed440e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/ClusterProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/ClusterProcessor.java
@@ -57,7 +57,7 @@ public class ClusterProcessor extends GridProcessorAdapter {
     private IgniteClusterImpl cluster;
 
     /** */
-    private boolean notifyEnabled;
+    private volatile boolean notifyEnabled;
 
     /** */
     @GridToStringExclude
@@ -155,6 +155,13 @@ public class ClusterProcessor extends GridProcessorAdapter {
     }
 
     /**
+     * Disables update notifier.
+     */
+    public void disableUpdateNotifier() {
+        notifyEnabled = false;
+    }
+
+    /**
      * @return Update notifier status.
      */
     public boolean updateNotifierEnabled() {
@@ -171,7 +178,7 @@ public class ClusterProcessor extends GridProcessorAdapter {
     /**
      * Update notifier timer task.
      */
-    private static class UpdateNotifierTimerTask extends GridTimerTask {
+    private class UpdateNotifierTimerTask extends GridTimerTask {
         /** Reference to kernal. */
         private final WeakReference<IgniteKernal> kernalRef;
 
@@ -200,6 +207,9 @@ public class ClusterProcessor extends GridProcessorAdapter {
 
         /** {@inheritDoc} */
         @Override public void safeRun() throws InterruptedException {
+            if (!notifyEnabled)
+                return;
+
             if (!first) {
                 IgniteKernal kernal = kernalRef.get();
 
@@ -228,4 +238,4 @@ public class ClusterProcessor extends GridProcessorAdapter {
             }
         }
     }
-}
\ No newline at end of file
+}


Mime
View raw message