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 2024/12/09 11:59:56 UTC
(ignite) branch master updated: IGNITE-23843 Remove IgniteFeatures#SUSPEND_RESUME_PESSIMISTIC_TX and related code (#11701)
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 a3d93a9be10 IGNITE-23843 Remove IgniteFeatures#SUSPEND_RESUME_PESSIMISTIC_TX and related code (#11701)
a3d93a9be10 is described below
commit a3d93a9be102b36b1e5e585cfaa8111304574ca9
Author: Nikolay <ni...@apache.org>
AuthorDate: Mon Dec 9 14:59:49 2024 +0300
IGNITE-23843 Remove IgniteFeatures#SUSPEND_RESUME_PESSIMISTIC_TX and related code (#11701)
---
.../org/apache/ignite/internal/IgniteFeatures.java | 3 ---
.../cache/transactions/IgniteTxManager.java | 22 ----------------------
2 files changed, 25 deletions(-)
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteFeatures.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteFeatures.java
index d729bd00674..45aee786eb6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteFeatures.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteFeatures.java
@@ -47,9 +47,6 @@ public enum IgniteFeatures {
/** Support of splitted cache configurations to avoid broken deserialization on non-affinity nodes. */
SPLITTED_CACHE_CONFIGURATIONS(5),
- /** Support of suspend/resume operations for pessimistic transactions. */
- SUSPEND_RESUME_PESSIMISTIC_TX(10),
-
/** Distributed metastorage. */
DISTRIBUTED_METASTORAGE(11),
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
index 3920585f00b..40c3881ef9d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
@@ -49,7 +49,6 @@ import org.apache.ignite.configuration.TransactionConfiguration;
import org.apache.ignite.events.DiscoveryEvent;
import org.apache.ignite.failure.FailureContext;
import org.apache.ignite.failure.FailureType;
-import org.apache.ignite.internal.IgniteFeatures;
import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
import org.apache.ignite.internal.cluster.DistributedTransactionConfiguration;
@@ -143,7 +142,6 @@ import static org.apache.ignite.internal.processors.cache.transactions.IgniteInt
import static org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx.FinalizationStatus.USER_FINISH;
import static org.apache.ignite.internal.processors.security.SecurityUtils.securitySubjectId;
import static org.apache.ignite.internal.util.GridConcurrentFactory.newMap;
-import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
import static org.apache.ignite.transactions.TransactionState.ACTIVE;
import static org.apache.ignite.transactions.TransactionState.COMMITTED;
import static org.apache.ignite.transactions.TransactionState.COMMITTING;
@@ -279,12 +277,6 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
/** TxDeadlock detection. */
private TxDeadlockDetection txDeadlockDetection;
- /**
- * Indicates whether {@code suspend()} and {@code resume()} operations are supported for pessimistic transactions
- * cluster wide.
- */
- private volatile boolean suspendResumeForPessimisticSupported;
-
/** The futures for changing transaction timeout on partition map exchange. */
private final ConcurrentMap<UUID, TxTimeoutOnPartitionMapExchangeChangeFuture> txTimeoutOnPartitionMapExchangeFuts =
new ConcurrentHashMap<>();
@@ -371,9 +363,6 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
removeTxReturn(entry.getKey());
}
}
-
- suspendResumeForPessimisticSupported = IgniteFeatures.allNodesSupports(
- cctx.discovery().remoteNodes(), IgniteFeatures.SUSPEND_RESUME_PESSIMISTIC_TX);
},
EVT_NODE_FAILED, EVT_NODE_LEFT, EVT_NODE_JOINED);
@@ -410,12 +399,6 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
TransactionView::new);
}
- /** {@inheritDoc} */
- @Override protected void onKernalStart0(boolean active) {
- suspendResumeForPessimisticSupported = IgniteFeatures.allNodesSupports(
- cctx.discovery().remoteNodes(), IgniteFeatures.SUSPEND_RESUME_PESSIMISTIC_TX);
- }
-
/**
* @param cacheId Cache ID.
*/
@@ -2640,11 +2623,6 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
public void suspendTx(final GridNearTxLocal tx) throws IgniteCheckedException {
assert tx != null && !tx.system() : tx;
- if (tx.concurrency == PESSIMISTIC && !suspendResumeForPessimisticSupported) {
- throw new IgniteCheckedException("Suspend operation cannot be called " +
- "because some nodes in the cluster don't support this feature.");
- }
-
if (!tx.state(SUSPENDED)) {
throw new IgniteCheckedException("Trying to suspend transaction with incorrect state "
+ "[expected=" + ACTIVE + ", actual=" + tx.state() + ']');