Skip to content

Commit

Permalink
ignite-gg-8.0.2.ea2 fix testDuplicatedDiscoveryDataRemoved
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitriy Govorukhin committed Jan 16, 2017
1 parent e1b84b4 commit 166d637
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand All @@ -105,7 +105,7 @@ public DynamicCacheChangeRequest(UUID requestId, String cacheName, UUID initiati
* @return Request ID.
*/
public UUID requestId() {
return requestId;
return reqId;
}

/**
Expand Down
Expand Up @@ -2041,8 +2041,9 @@ private GridCacheSharedContext createSharedContext(GridKernalContext kernalCtx,

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());

Expand All @@ -2068,7 +2069,7 @@ private GridCacheSharedContext createSharedContext(GridKernalContext kernalCtx,

for (DynamicCacheDescriptor desc : registeredCaches.values()) {
DynamicCacheChangeRequest req = new DynamicCacheChangeRequest(
UUID.randomUUID(), desc.cacheConfiguration().getName(), null);
null, desc.cacheConfiguration().getName(), null);

req.startCacheConfiguration(desc.cacheConfiguration());

Expand All @@ -2083,7 +2084,7 @@ private GridCacheSharedContext createSharedContext(GridKernalContext kernalCtx,

for (DynamicCacheDescriptor desc : registeredTemplates.values()) {
DynamicCacheChangeRequest req = new DynamicCacheChangeRequest(
UUID.randomUUID(), desc.cacheConfiguration().getName(), null);
null, desc.cacheConfiguration().getName(), null);

req.startCacheConfiguration(desc.cacheConfiguration());

Expand Down
Expand Up @@ -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;
Expand Down

0 comments on commit 166d637

Please sign in to comment.