ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject ignite git commit: IGNITE-7699 BinaryMetadata exchange should not be triggered if metadata was not updated - Fixes #3523.
Date Fri, 16 Feb 2018 13:21:55 GMT
Repository: ignite
Updated Branches:
  refs/heads/master 9fd0f4cd2 -> bcd388157


IGNITE-7699 BinaryMetadata exchange should not be triggered if metadata was not updated -
Fixes #3523.

Signed-off-by: Alexey Goncharuk <alexey.goncharuk@gmail.com>


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

Branch: refs/heads/master
Commit: bcd388157c76ec684f043fa140b24dfd3c11f5cb
Parents: 9fd0f4c
Author: Sergey Chugunov <sergey.chugunov@gmail.com>
Authored: Fri Feb 16 16:21:12 2018 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Fri Feb 16 16:21:12 2018 +0300

----------------------------------------------------------------------
 .../processors/cache/binary/BinaryMetadataTransport.java     | 8 ++++++--
 .../cache/binary/CacheObjectBinaryProcessorImpl.java         | 4 ++++
 .../IgniteAllBaselineNodesOnlineFullApiSelfTest.java         | 4 +---
 .../baseline/IgniteBaselineAbstractFullApiSelfTest.java      | 2 +-
 .../baseline/IgniteOfflineBaselineNodeFullApiSelfTest.java   | 4 +---
 .../IgniteOnlineNodeOutOfBaselineFullApiSelfTest.java        | 2 +-
 .../IgniteStableBaselineCachePutAllFailoverTest.java         | 3 ++-
 .../IgniteStableBaselineCacheRemoveFailoverTest.java         | 3 ++-
 8 files changed, 18 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bcd38815/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataTransport.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataTransport.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataTransport.java
index e2eef28..9402a32 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataTransport.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataTransport.java
@@ -159,7 +159,8 @@ final class BinaryMetadataTransport {
         MetadataUpdateResultFuture resFut = new MetadataUpdateResultFuture();
 
         if (log.isDebugEnabled())
-            log.debug("Requesting metadata update for " + metadata.typeId());
+            log.debug("Requesting metadata update for " + metadata.typeId() + "; caller thread
is blocked on future "
+                + resFut);
 
         synchronized (this) {
             unlabeledFutures.add(resFut);
@@ -418,6 +419,9 @@ final class BinaryMetadataTransport {
 
         /** {@inheritDoc} */
         @Override public void onCustomEvent(AffinityTopologyVersion topVer, ClusterNode snd,
MetadataUpdateAcceptedMessage msg) {
+            if (log.isDebugEnabled())
+                log.debug("Received MetadataUpdateAcceptedMessage " + msg);
+
             if (msg.duplicated())
                 return;
 
@@ -468,7 +472,7 @@ final class BinaryMetadataTransport {
             GridFutureAdapter<MetadataUpdateResult> fut = syncMap.get(new SyncKey(typeId,
newAcceptedVer));
 
             if (log.isDebugEnabled())
-                log.debug("Completing future for " + metaLocCache.get(typeId));
+                log.debug("Completing future " + fut + " for " + metaLocCache.get(typeId));
 
             if (fut != null)
                 fut.onDone(MetadataUpdateResult.createSuccessfulResult());

http://git-wip-us.apache.org/repos/asf/ignite/blob/bcd38815/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
index 3a0ba3c..a9d2f88 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
@@ -442,6 +442,10 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
 
             BinaryMetadata mergedMeta = BinaryUtils.mergeMetadata(oldMeta, newMeta0);
 
+            //metadata requested to be added is exactly the same as already presented in
the cache
+            if (mergedMeta == oldMeta)
+                return;
+
             MetadataUpdateResult res = transport.requestMetadataUpdate(mergedMeta).get();
 
             assert res != null;

http://git-wip-us.apache.org/repos/asf/ignite/blob/bcd38815/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteAllBaselineNodesOnlineFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteAllBaselineNodesOnlineFullApiSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteAllBaselineNodesOnlineFullApiSelfTest.java
index b2de1db..8365f87 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteAllBaselineNodesOnlineFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteAllBaselineNodesOnlineFullApiSelfTest.java
@@ -16,10 +16,8 @@
  */
 package org.apache.ignite.internal.processors.cache.persistence.baseline;
 
-import org.apache.ignite.testframework.GridTestUtils;
-
 /**
- *
+ * Full API cache tests when all online nodes in the cluster are in BaselineTopology.
  */
 public class IgniteAllBaselineNodesOnlineFullApiSelfTest extends IgniteBaselineAbstractFullApiSelfTest
{
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/bcd38815/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteBaselineAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteBaselineAbstractFullApiSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteBaselineAbstractFullApiSelfTest.java
index d78c289..1825666 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteBaselineAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteBaselineAbstractFullApiSelfTest.java
@@ -23,7 +23,7 @@ import org.apache.ignite.configuration.WALMode;
 import org.apache.ignite.internal.processors.cache.GridCacheAbstractFullApiSelfTest;
 
 /**
- *
+ * Abstract test class for Full API cache tests with presence of BaselineTopology.
  */
 public abstract class IgniteBaselineAbstractFullApiSelfTest extends GridCacheAbstractFullApiSelfTest
{
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/bcd38815/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteOfflineBaselineNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteOfflineBaselineNodeFullApiSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteOfflineBaselineNodeFullApiSelfTest.java
index ee4f6b4..2282165 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteOfflineBaselineNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteOfflineBaselineNodeFullApiSelfTest.java
@@ -16,10 +16,8 @@
  */
 package org.apache.ignite.internal.processors.cache.persistence.baseline;
 
-import org.apache.ignite.testframework.GridTestUtils;
-
 /**
- *
+ * Full API cache tests with situation when there is an offline node from BaselineTopology.
  */
 public class IgniteOfflineBaselineNodeFullApiSelfTest extends IgniteBaselineAbstractFullApiSelfTest
{
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/bcd38815/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteOnlineNodeOutOfBaselineFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteOnlineNodeOutOfBaselineFullApiSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteOnlineNodeOutOfBaselineFullApiSelfTest.java
index 6cb2b24..3bd8c0f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteOnlineNodeOutOfBaselineFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteOnlineNodeOutOfBaselineFullApiSelfTest.java
@@ -17,7 +17,7 @@
 package org.apache.ignite.internal.processors.cache.persistence.baseline;
 
 /**
- *
+ * Full API cache tests with situation when there is an online node out of BaselineTopology.
  */
 public class IgniteOnlineNodeOutOfBaselineFullApiSelfTest extends IgniteBaselineAbstractFullApiSelfTest
{
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/bcd38815/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteStableBaselineCachePutAllFailoverTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteStableBaselineCachePutAllFailoverTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteStableBaselineCachePutAllFailoverTest.java
index b89415b..80f3b16 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteStableBaselineCachePutAllFailoverTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteStableBaselineCachePutAllFailoverTest.java
@@ -28,7 +28,8 @@ import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.testframework.GridTestUtils;
 
 /**
- *
+ * Failover cache test with putAll operations executed with presence of BaselineTopology
+ * when one random node from BLT is constantly restarted during the load.
  */
 public class IgniteStableBaselineCachePutAllFailoverTest extends CachePutAllFailoverAbstractTest
{
     /** */

http://git-wip-us.apache.org/repos/asf/ignite/blob/bcd38815/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteStableBaselineCacheRemoveFailoverTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteStableBaselineCacheRemoveFailoverTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteStableBaselineCacheRemoveFailoverTest.java
index c07a9d2..e71f33f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteStableBaselineCacheRemoveFailoverTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteStableBaselineCacheRemoveFailoverTest.java
@@ -37,7 +37,8 @@ import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 
 /**
- *
+ * Failover cache test with remove operations executed with presence of BaselineTopology
+ * when one random node from BLT is constantly restarted during the load.
  */
 public class IgniteStableBaselineCacheRemoveFailoverTest extends GridCacheAbstractRemoveFailureTest
{
     /** */


Mime
View raw message