Skip to content

Commit

Permalink
IGNITE-24087 Remove PRELOAD_PARTITION_SINCE (#11791)
Browse files Browse the repository at this point in the history
  • Loading branch information
maksaska authored Jan 13, 2025
1 parent 720c78a commit a6a4063
Showing 1 changed file with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@
import org.apache.ignite.lang.IgniteInClosure;
import org.apache.ignite.lang.IgniteOutClosure;
import org.apache.ignite.lang.IgnitePredicate;
import org.apache.ignite.lang.IgniteProductVersion;
import org.apache.ignite.lang.IgniteRunnable;
import org.apache.ignite.plugin.security.SecurityPermission;
import org.apache.ignite.resources.IgniteInstanceResource;
Expand Down Expand Up @@ -199,9 +198,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
public static final int MAX_RETRIES =
IgniteSystemProperties.getInteger(IGNITE_CACHE_RETRIES_COUNT, DFLT_CACHE_RETRIES_COUNT);

/** Minimum version supporting partition preloading. */
private static final IgniteProductVersion PRELOAD_PARTITION_SINCE = IgniteProductVersion.fromString("2.7.0");

/** Exception thrown when a non-transactional IgniteCache clear operation is invoked within a transaction. */
public static final String NON_TRANSACTIONAL_IGNITE_CACHE_CLEAR_IN_TX_ERROR_MESSAGE = "Failed to invoke a " +
"non-transactional IgniteCache clear operation within a transaction.";
Expand Down Expand Up @@ -292,8 +288,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
/** Asynchronous operations limit semaphore. */
private Semaphore asyncOpsSem;

/** {@code True} if attempted to use partition preloading on outdated node. */
private volatile boolean partPreloadBadVerWarned;
/** {@code True} if attempted to use partition preloading on not mapped node. */
private volatile boolean partPreloadNotMappedWarned;

/** Active. */
private volatile boolean active;
Expand Down Expand Up @@ -1150,13 +1146,11 @@ private IgniteInternalFuture<?> executePreloadTask(int part) throws IgniteChecke

@Nullable ClusterNode targetNode = ctx.affinity().primaryByPartition(part, ctx.topology().readyTopologyVersion());

if (targetNode == null || targetNode.version().compareTo(PRELOAD_PARTITION_SINCE) < 0) {
if (!partPreloadBadVerWarned) {
U.warn(log(), "Attempting to execute partition preloading task on outdated or not mapped node " +
"[targetNodeVer=" + (targetNode == null ? "NA" : targetNode.version()) +
", minSupportedNodeVer=" + PRELOAD_PARTITION_SINCE + ']');
if (targetNode == null) {
if (!partPreloadNotMappedWarned) {
U.warn(log(), "Attempting to execute partition preloading task on not mapped node");

partPreloadBadVerWarned = true;
partPreloadNotMappedWarned = true;
}

return new GridFinishedFuture<>();
Expand Down

0 comments on commit a6a4063

Please sign in to comment.