Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGNITE-24097 Remove ExchangeLatchManager#VERSION_SINCE #11805

Merged
merged 3 commits into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -58,9 +59,6 @@
* 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.
Expand Down Expand Up @@ -298,12 +296,7 @@ private Collection<ClusterNode> aliveNodesForTopologyVer(AffinityTopologyVersion
* @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);
Expand Down Expand Up @@ -335,7 +328,6 @@ private List<ClusterNode> excludeJoinedNodes(List<ClusterNode> participantNodes,

List<ClusterNode> applicableNodes = aliveNodes
.stream()
.filter(node -> node.version().compareTo(VERSION_SINCE) >= 0)
.sorted(Comparator.comparing(ClusterNode::order))
.collect(Collectors.toList());

Expand Down
Loading