You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by se...@apache.org on 2020/12/07 08:36:25 UTC

[ignite] branch master updated: IGNITE-13811 Fixed bug with removing wrong key from pingMap in ServerImpl. - Fixes #8539.

This is an automated email from the ASF dual-hosted git repository.

sergeychugunov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new c4ab185  IGNITE-13811 Fixed bug with removing wrong key from pingMap in ServerImpl. - Fixes #8539.
c4ab185 is described below

commit c4ab185f6a361796c45f1f0fda01a16e28f26a48
Author: ibessonov <be...@gmail.com>
AuthorDate: Mon Dec 7 11:18:19 2020 +0300

    IGNITE-13811 Fixed bug with removing wrong key from pingMap in ServerImpl. - Fixes #8539.
    
    Signed-off-by: Sergey Chugunov <se...@gmail.com>
---
 .../main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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 75b55b9..a2ebbda 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
@@ -860,7 +860,9 @@ class ServerImpl extends TcpDiscoveryImpl {
 
         GridPingFutureAdapter<IgniteBiTuple<UUID, Boolean>> fut = new GridPingFutureAdapter<>(nodeId);
 
-        GridPingFutureAdapter<IgniteBiTuple<UUID, Boolean>> oldFut = pingMap.putIfAbsent(addr, fut);
+        InetSocketAddress addrKey = addr;
+
+        GridPingFutureAdapter<IgniteBiTuple<UUID, Boolean>> oldFut = pingMap.putIfAbsent(addrKey, fut);
 
         if (oldFut != null)
             return oldFut.get();
@@ -960,7 +962,7 @@ class ServerImpl extends TcpDiscoveryImpl {
                 if (!fut.isDone())
                     fut.onDone(U.exceptionWithSuppressed("Failed to ping node by address: " + addr, errs));
 
-                boolean b = pingMap.remove(addr, fut);
+                boolean b = pingMap.remove(addrKey, fut);
 
                 assert b;
             }