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-24095 Remove FORCE_ADD_REASSIGNMENT_SINCE #11812

Merged
merged 2 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 @@ -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
Loading