You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ni...@apache.org on 2025/01/22 11:13:49 UTC

(ignite) branch master updated: IGNITE-24097 Remove ExchangeLatchManager#VERSION_SINCE (#11805)

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

nizhikov 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 a415970ca8b IGNITE-24097 Remove ExchangeLatchManager#VERSION_SINCE (#11805)
a415970ca8b is described below

commit a415970ca8bf13ed0c3bbf7fc880b66acb1f1f84
Author: Vladislav Novikov <47...@users.noreply.github.com>
AuthorDate: Wed Jan 22 14:13:42 2025 +0300

    IGNITE-24097 Remove ExchangeLatchManager#VERSION_SINCE (#11805)
---
 .../dht/preloader/latch/ExchangeLatchManager.java            | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/latch/ExchangeLatchManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/latch/ExchangeLatchManager.java
index 872e4130707..4d03edce1fc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/latch/ExchangeLatchManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/latch/ExchangeLatchManager.java
@@ -16,6 +16,7 @@
  */
 package org.apache.ignite.internal.processors.cache.distributed.dht.preloader.latch;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Comparator;
 import java.util.HashSet;
@@ -58,9 +59,6 @@ import static org.apache.ignite.events.EventType.EVT_NODE_LEFT;
  * Class is responsible to create and manage instances of distributed latches {@link Latch}.
  */
 public class ExchangeLatchManager {
-    /** Version since latch management is available. */
-    private static final IgniteProductVersion VERSION_SINCE = IgniteProductVersion.fromString("2.5.0");
-
     /**
      * Exchange latch V2 protocol introduces following optimization: Joining nodes are explicitly excluded from possible
      * latch participants.
@@ -298,12 +296,7 @@ public class ExchangeLatchManager {
      * @return Collection of alive server nodes with latch functionality.
      */
     private Collection<ClusterNode> getLatchParticipants(AffinityTopologyVersion topVer) {
-        Collection<ClusterNode> aliveNodes = aliveNodesForTopologyVer(topVer);
-
-        List<ClusterNode> participantNodes = aliveNodes
-            .stream()
-            .filter(node -> node.version().compareTo(VERSION_SINCE) >= 0)
-            .collect(Collectors.toList());
+        List<ClusterNode> participantNodes = new ArrayList<>(aliveNodesForTopologyVer(topVer));
 
         if (canSkipJoiningNodes(topVer))
             return excludeJoinedNodes(participantNodes, topVer);
@@ -335,7 +328,6 @@ public class ExchangeLatchManager {
 
         List<ClusterNode> applicableNodes = aliveNodes
             .stream()
-            .filter(node -> node.version().compareTo(VERSION_SINCE) >= 0)
             .sorted(Comparator.comparing(ClusterNode::order))
             .collect(Collectors.toList());