ignite-gg-8.0.2.ea2 fix testDuplicatedDiscoveryDataRemoved
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/166d6371 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/166d6371 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/166d6371 Branch: refs/heads/ignite-gg-11810-1 Commit: 166d63713c259f0b5882c41dffd3bf66d47da0fd Parents: e1b84b4 Author: Dmitriy Govorukhin <dgovoruk...@gridgain.com> Authored: Mon Jan 16 17:38:49 2017 +0300 Committer: Dmitriy Govorukhin <dgovoruk...@gridgain.com> Committed: Mon Jan 16 17:38:49 2017 +0300 ---------------------------------------------------------------------- .../processors/cache/DynamicCacheChangeRequest.java | 8 ++++---- .../internal/processors/cache/GridCacheProcessor.java | 9 +++++---- .../org/apache/ignite/spi/discovery/tcp/ServerImpl.java | 1 - 3 files changed, 9 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/166d6371/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java index a3116ad..1e5ab88 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java @@ -35,7 +35,7 @@ public class DynamicCacheChangeRequest implements Serializable { private static final long serialVersionUID = 0L; /** */ - private UUID requestId; + private UUID reqId; /** Start ID. */ private IgniteUuid deploymentId; @@ -95,8 +95,8 @@ public class DynamicCacheChangeRequest implements Serializable { * @param cacheName Cache stop name. * @param initiatingNodeId Initiating node ID. */ - public DynamicCacheChangeRequest(UUID requestId, String cacheName, UUID initiatingNodeId) { - this.requestId = requestId; + public DynamicCacheChangeRequest(UUID reqId, String cacheName, UUID initiatingNodeId) { + this.reqId = reqId; this.cacheName = cacheName; this.initiatingNodeId = initiatingNodeId; } @@ -105,7 +105,7 @@ public class DynamicCacheChangeRequest implements Serializable { * @return Request ID. */ public UUID requestId() { - return requestId; + return reqId; } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/166d6371/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java index 1e5fcc1..7f4fb99 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java @@ -2041,8 +2041,9 @@ public class GridCacheProcessor extends GridProcessorAdapter { if (desc == null) continue; - - DynamicCacheChangeRequest req = new DynamicCacheChangeRequest(UUID.randomUUID(), cache.name(), null); + // requestId must be null because on different node will be different byte [] and we get duplicate discovery data + // see TcpDiscoveryNodeAddedMessage#addDiscoveryData 'Arrays.equals(curData, discoDataEntry.getValue())' + DynamicCacheChangeRequest req = new DynamicCacheChangeRequest(null, cache.name(), null); req.startCacheConfiguration(desc.cacheConfiguration()); @@ -2068,7 +2069,7 @@ public class GridCacheProcessor extends GridProcessorAdapter { for (DynamicCacheDescriptor desc : registeredCaches.values()) { DynamicCacheChangeRequest req = new DynamicCacheChangeRequest( - UUID.randomUUID(), desc.cacheConfiguration().getName(), null); + null, desc.cacheConfiguration().getName(), null); req.startCacheConfiguration(desc.cacheConfiguration()); @@ -2083,7 +2084,7 @@ public class GridCacheProcessor extends GridProcessorAdapter { for (DynamicCacheDescriptor desc : registeredTemplates.values()) { DynamicCacheChangeRequest req = new DynamicCacheChangeRequest( - UUID.randomUUID(), desc.cacheConfiguration().getName(), null); + null, desc.cacheConfiguration().getName(), null); req.startCacheConfiguration(desc.cacheConfiguration()); http://git-wip-us.apache.org/repos/asf/ignite/blob/166d6371/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java index 44159c6..585c153 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java @@ -18,7 +18,6 @@ package org.apache.ignite.spi.discovery.tcp; import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.ObjectStreamException;