Skip to content

Commit

Permalink
IGNITE-24095 Remove FORCE_ADD_REASSIGNMENT_SINCE. (#11812)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladnovoren authored Jan 22, 2025
1 parent bc7061e commit d1962ec
Showing 1 changed file with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,6 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
private static final int RELEASE_FUTURE_DUMP_THRESHOLD = IgniteSystemProperties.getInteger(
IGNITE_PARTITION_RELEASE_FUTURE_DUMP_THRESHOLD, DFLT_PARTITION_RELEASE_FUTURE_DUMP_THRESHOLD);

/** */
private static final IgniteProductVersion FORCE_AFF_REASSIGNMENT_SINCE = IgniteProductVersion.fromString("2.4.3");

/**
* This may be useful when per-entry (not per-cache based) partition policy is in use.
* See {@link IgniteSystemProperties#IGNITE_SKIP_PARTITION_SIZE_VALIDATION} for details.
Expand Down Expand Up @@ -967,8 +964,7 @@ else if (firstDiscoEvt.type() == EVT_DISCOVERY_CUSTOM_EVT) {

DiscoveryCustomMessage msg = ((DiscoveryCustomEvent)firstDiscoEvt).customMessage();

forceAffReassignment = DiscoveryCustomEvent.requiresCentralizedAffinityAssignment(msg)
&& firstEventCache().minimumNodeVersion().compareToIgnoreTimestamp(FORCE_AFF_REASSIGNMENT_SINCE) >= 0;
forceAffReassignment = DiscoveryCustomEvent.requiresCentralizedAffinityAssignment(msg);

if (msg instanceof ChangeGlobalStateMessage) {
assert exchActions != null && !exchActions.empty();
Expand Down Expand Up @@ -1412,19 +1408,12 @@ private ExchangeType onClusterStateChangeRequest(boolean crd) {
}
}
else if (req.state().active()) {
assert forceAffReassignment;

cctx.exchange().exchangerBlockingSectionBegin();

// TODO: BLT changes on inactive cluster can't be handled easily because persistent storage hasn't been initialized yet.
try {
if (!forceAffReassignment) {
// possible only if cluster contains nodes without forceAffReassignment mode
assert firstEventCache().minimumNodeVersion()
.compareToIgnoreTimestamp(FORCE_AFF_REASSIGNMENT_SINCE) < 0
: firstEventCache().minimumNodeVersion();

cctx.affinity().onBaselineTopologyChanged(this, crd);
}

if (CU.isPersistenceEnabled(kctx.config()) && !kctx.clientNode())
kctx.state().onBaselineTopologyChanged(req.baselineTopology(),
req.prevBaselineTopologyHistoryItem());
Expand Down

0 comments on commit d1962ec

Please sign in to comment.