This is an automated email from the ASF dual-hosted git repository.
av 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 97eb3179e3b IGNITE-20508 DeadlockDetectionManager removal (#10959)
97eb3179e3b is described below
commit 97eb3179e3b15667ae7da8e2fea939839ab7a716
Author: Anton Vinogradov <[email protected]>
AuthorDate: Tue Oct 3 14:38:31 2023 +0300
IGNITE-20508 DeadlockDetectionManager removal (#10959)
---
.../ignite/codegen/MessageCodeGenerator.java | 5 -
.../configuration/TransactionConfiguration.java | 47 ---
.../org/apache/ignite/internal/IgniteKernal.java | 4 +-
.../ignite/internal/IgniteNodeAttributes.java | 2 +-
.../client/thin/ClientClusterGroupImpl.java | 11 +-
.../communication/GridIoMessageFactory.java | 4 -
.../processors/cache/GridCacheProcessor.java | 4 -
.../processors/cache/GridCacheSharedContext.java | 17 -
.../cache/ValidationOnNodeJoinUtils.java | 52 +---
.../cache/mvcc/DeadlockDetectionManager.java | 343 ---------------------
.../processors/cache/mvcc/DeadlockProbe.java | 201 ------------
.../processors/cache/mvcc/MvccProcessorImpl.java | 7 -
.../internal/processors/cache/mvcc/ProbedTx.java | 239 --------------
.../snapshot/IgniteSnapshotManager.java | 2 +-
.../wal/reader/IgniteWalIteratorFactory.java | 2 +-
.../platform/utils/PlatformConfigurationUtils.java | 3 +-
.../handlers/top/GridTopologyCommandHandler.java | 4 +-
.../db/wal/IgniteWalIteratorSwitchSegmentTest.java | 2 -
.../pagemem/BPlusTreePageMemoryImplTest.java | 1 -
.../BPlusTreeReuseListPageMemoryImplTest.java | 1 -
.../pagemem/IndexStoragePageMemoryImplTest.java | 1 -
.../pagemem/PageMemoryImplNoLoadTest.java | 1 -
.../persistence/pagemem/PageMemoryImplTest.java | 1 -
.../loadtests/hashmap/GridCacheTestContext.java | 1 -
.../Apache.Ignite.Core/IgniteConfiguration.cs | 2 -
.../IgniteConfigurationSection.xsd | 7 -
.../Transactions/TransactionConfiguration.cs | 15 -
27 files changed, 27 insertions(+), 952 deletions(-)
diff --git
a/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
b/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
index 2261acc9989..b5e5dee1e36 100644
---
a/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
+++
b/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
@@ -44,8 +44,6 @@ import org.apache.ignite.internal.GridDirectMap;
import org.apache.ignite.internal.GridDirectTransient;
import org.apache.ignite.internal.IgniteCodeGeneratingFail;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
-import org.apache.ignite.internal.processors.cache.mvcc.DeadlockProbe;
-import org.apache.ignite.internal.processors.cache.mvcc.ProbedTx;
import org.apache.ignite.internal.util.IgniteUtils;
import org.apache.ignite.internal.util.typedef.internal.SB;
import org.apache.ignite.internal.util.typedef.internal.U;
@@ -173,9 +171,6 @@ public class MessageCodeGenerator {
MessageCodeGenerator gen = new MessageCodeGenerator(srcDir);
- gen.generateAndWrite(ProbedTx.class);
- gen.generateAndWrite(DeadlockProbe.class);
-
// gen.generateAll(true);
// gen.generateAndWrite(GridCacheMessage.class);
diff --git
a/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
b/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
index 19f22fb0bec..06b06159282 100644
---
a/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
+++
b/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
@@ -20,10 +20,8 @@ package org.apache.ignite.configuration;
import java.io.Serializable;
import java.util.ArrayList;
import javax.cache.configuration.Factory;
-import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.internal.util.TransientSerializable;
import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.lang.IgniteExperimental;
import org.apache.ignite.lang.IgniteProductVersion;
import org.apache.ignite.transactions.Transaction;
import org.apache.ignite.transactions.TransactionConcurrency;
@@ -58,9 +56,6 @@ public class TransactionConfiguration implements Serializable
{
/** Transaction timeout on partition map synchronization. */
public static final long TX_TIMEOUT_ON_PARTITION_MAP_EXCHANGE = 0;
- /** Default timeout before starting deadlock detection. */
- public static final long DFLT_DEADLOCK_TIMEOUT = 10_000;
-
/**
* Default size of pessimistic transactions log.
* @deprecated Pessimistic tx log linger property has no effect.
@@ -85,9 +80,6 @@ public class TransactionConfiguration implements Serializable
{
*/
private volatile long txTimeoutOnPartitionMapExchange =
TX_TIMEOUT_ON_PARTITION_MAP_EXCHANGE;
- /** Timeout before starting deadlock detection. */
- private long deadlockTimeout = DFLT_DEADLOCK_TIMEOUT;
-
/** Pessimistic tx log size. */
@Deprecated
private int pessimisticTxLogSize;
@@ -123,7 +115,6 @@ public class TransactionConfiguration implements
Serializable {
dfltIsolation = cfg.getDefaultTxIsolation();
dfltTxTimeout = cfg.getDefaultTxTimeout();
txTimeoutOnPartitionMapExchange =
cfg.getTxTimeoutOnPartitionMapExchange();
- deadlockTimeout = cfg.getDeadlockTimeout();
pessimisticTxLogLinger = cfg.getPessimisticTxLogLinger();
pessimisticTxLogSize = cfg.getPessimisticTxLogSize();
txSerEnabled = cfg.isTxSerializableEnabled();
@@ -260,44 +251,6 @@ public class TransactionConfiguration implements
Serializable {
return this;
}
- /**
- * <b>This is an experimental feature. Transactional SQL is currently in a
beta status.</b>
- * <p>
- * Transaction deadlocks occurred for caches configured with {@link
CacheAtomicityMode#TRANSACTIONAL_SNAPSHOT}
- * can be resolved automatically.
- * <p>
- * Deadlock detection starts when one transaction is waiting for an entry
lock more than a timeout specified by
- * this property.
- * <p>
- * Timeout is specified in milliseconds and {@code 0} means that automatic
deadlock detection is disabled. Default
- * value is defined by {@link #DFLT_DEADLOCK_TIMEOUT}.
- *
- * @return Timeout before starting deadlock detection.
- */
- @IgniteExperimental
- public long getDeadlockTimeout() {
- return deadlockTimeout;
- }
-
- /**
- * <b>This is an experimental feature. Transactional SQL is currently in a
beta status.</b>
- * <p>
- * Sets a timeout before starting deadlock detection for caches configured
with
- * {@link CacheAtomicityMode#TRANSACTIONAL_SNAPSHOT}.
- * <p>
- * Timeout is specified in milliseconds and {@code 0} means that automatic
deadlock detection is disabled. Default
- * value is defined by {@link #DFLT_DEADLOCK_TIMEOUT}.
- *
- * @param deadlockTimeout Timeout value in milliseconds.
- * @return {@code this} for chaining.
- */
- @IgniteExperimental
- public TransactionConfiguration setDeadlockTimeout(long deadlockTimeout) {
- this.deadlockTimeout = deadlockTimeout;
-
- return this;
- }
-
/**
* Gets size of pessimistic transactions log stored on node in order to
recover transaction commit if originating
* node has left grid before it has sent all messages to transaction nodes.
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index e61a1a8772f..538840c3bd3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -264,7 +264,7 @@ import static
org.apache.ignite.internal.IgniteNodeAttributes.ATTR_RESTART_ENABL
import static
org.apache.ignite.internal.IgniteNodeAttributes.ATTR_REST_PORT_RANGE;
import static
org.apache.ignite.internal.IgniteNodeAttributes.ATTR_SHUTDOWN_POLICY;
import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_SPI_CLASS;
-import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_TX_CONFIG;
+import static
org.apache.ignite.internal.IgniteNodeAttributes.ATTR_TX_SERIALIZABLE_ENABLED;
import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_USER_NAME;
import static org.apache.ignite.internal.IgniteVersionUtils.BUILD_TSTAMP_STR;
import static org.apache.ignite.internal.IgniteVersionUtils.COPYRIGHT;
@@ -1695,7 +1695,7 @@ public class IgniteKernal implements IgniteEx,
Externalizable {
addDataStorageConfigurationAttributes();
// Save transactions configuration.
- add(ATTR_TX_CONFIG, cfg.getTransactionConfiguration());
+ add(ATTR_TX_SERIALIZABLE_ENABLED,
cfg.getTransactionConfiguration().isTxSerializableEnabled());
// Supported features.
add(ATTR_IGNITE_FEATURES, IgniteFeatures.allFeatures());
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/IgniteNodeAttributes.java
b/modules/core/src/main/java/org/apache/ignite/internal/IgniteNodeAttributes.java
index 5fa6cbed2d2..16b29e1a0f0 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/IgniteNodeAttributes.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/IgniteNodeAttributes.java
@@ -79,7 +79,7 @@ public final class IgniteNodeAttributes {
public static final String ATTR_CACHE = ATTR_PREFIX + ".cache";
/** Internal attribute name constant. */
- public static final String ATTR_TX_CONFIG = ATTR_PREFIX + ".tx";
+ public static final String ATTR_TX_SERIALIZABLE_ENABLED = ATTR_PREFIX +
".tx.serializable.enabled";
/** Internal attribute name constant. */
public static final String ATTR_JMX_PORT = ATTR_PREFIX + ".jmx.port";
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/client/thin/ClientClusterGroupImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/client/thin/ClientClusterGroupImpl.java
index 0d8bf386c4f..b33a7caa1d7 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/client/thin/ClientClusterGroupImpl.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/client/thin/ClientClusterGroupImpl.java
@@ -34,6 +34,7 @@ import java.util.concurrent.ThreadLocalRandom;
import java.util.function.Function;
import java.util.function.IntFunction;
import java.util.function.Predicate;
+import org.apache.ignite.binary.BinaryObjectException;
import org.apache.ignite.client.ClientClusterGroup;
import org.apache.ignite.client.ClientException;
import org.apache.ignite.client.ClientFeatureNotSupportedByServerException;
@@ -438,8 +439,14 @@ class ClientClusterGroupImpl implements ClientClusterGroup
{
Map<String, Object> attrs = new HashMap<>(attrCnt);
- for (int i = 0; i < attrCnt; i++)
- attrs.put(reader.readString(), reader.readObjectDetached());
+ for (int i = 0; i < attrCnt; i++) {
+ try {
+ attrs.put(reader.readString(), reader.readObjectDetached());
+ }
+ catch (BinaryObjectException ignored) {
+ // Skipping deserialization issues related to the incompatible
classes from different versions.
+ }
+ }
return attrs;
}
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
index 3c0c2fbc78f..e5e7ca0efa3 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
@@ -121,10 +121,8 @@ import
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxQu
import
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxQueryResultsEnlistRequest;
import
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxQueryResultsEnlistResponse;
import
org.apache.ignite.internal.processors.cache.distributed.near.GridNearUnlockRequest;
-import org.apache.ignite.internal.processors.cache.mvcc.DeadlockProbe;
import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshotWithoutTxs;
import org.apache.ignite.internal.processors.cache.mvcc.MvccVersionImpl;
-import org.apache.ignite.internal.processors.cache.mvcc.ProbedTx;
import
org.apache.ignite.internal.processors.cache.mvcc.msg.MvccAckRequestQueryCntr;
import
org.apache.ignite.internal.processors.cache.mvcc.msg.MvccAckRequestQueryId;
import org.apache.ignite.internal.processors.cache.mvcc.msg.MvccAckRequestTx;
@@ -372,8 +370,6 @@ public class GridIoMessageFactory implements
MessageFactoryProvider {
factory.register((short)167, ServiceDeploymentProcessId::new);
factory.register((short)168,
ServiceSingleNodeDeploymentResultBatch::new);
factory.register((short)169, ServiceSingleNodeDeploymentResult::new);
- factory.register((short)170, DeadlockProbe::new);
- factory.register((short)171, ProbedTx::new);
factory.register(GridQueryKillRequest.TYPE_CODE,
GridQueryKillRequest::new);
factory.register(GridQueryKillResponse.TYPE_CODE,
GridQueryKillResponse::new);
factory.register(GridIoSecurityAwareMessage.TYPE_CODE,
GridIoSecurityAwareMessage::new);
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 4618afce95b..7524b9124c8 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -109,7 +109,6 @@ import
org.apache.ignite.internal.processors.cache.distributed.near.GridNearAtom
import
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTransactionalCache;
import org.apache.ignite.internal.processors.cache.dr.GridCacheDrManager;
import org.apache.ignite.internal.processors.cache.jta.CacheJtaManagerAdapter;
-import
org.apache.ignite.internal.processors.cache.mvcc.DeadlockDetectionManager;
import org.apache.ignite.internal.processors.cache.mvcc.MvccCachingManager;
import org.apache.ignite.internal.processors.cache.persistence.DataRegion;
import
org.apache.ignite.internal.processors.cache.persistence.DatabaseLifecycleListener;
@@ -3077,8 +3076,6 @@ public class GridCacheProcessor extends
GridProcessorAdapter {
MvccCachingManager mvccCachingMgr = new MvccCachingManager();
- DeadlockDetectionManager deadlockDetectionMgr = new
DeadlockDetectionManager();
-
CacheDiagnosticManager diagnosticMgr = new CacheDiagnosticManager();
return new GridCacheSharedContext(
@@ -3100,7 +3097,6 @@ public class GridCacheProcessor extends
GridProcessorAdapter {
jta,
storeSesLsnrs,
mvccCachingMgr,
- deadlockDetectionMgr,
diagnosticMgr,
transMgr
);
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
index 4b7ccb7fcd2..6811c5d660d 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
@@ -49,7 +49,6 @@ import
org.apache.ignite.internal.processors.cache.distributed.dht.topology.Grid
import
org.apache.ignite.internal.processors.cache.distributed.dht.topology.PartitionsEvictManager;
import
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal;
import org.apache.ignite.internal.processors.cache.jta.CacheJtaManagerAdapter;
-import
org.apache.ignite.internal.processors.cache.mvcc.DeadlockDetectionManager;
import org.apache.ignite.internal.processors.cache.mvcc.MvccCachingManager;
import org.apache.ignite.internal.processors.cache.mvcc.MvccProcessor;
import org.apache.ignite.internal.processors.cache.persistence.DataRegion;
@@ -141,9 +140,6 @@ public class GridCacheSharedContext<K, V> {
/** Mvcc caching manager. */
private MvccCachingManager mvccCachingMgr;
- /** Deadlock detection manager. */
- private DeadlockDetectionManager deadlockDetectionMgr;
-
/** Cache objects transformation manager. */
private CacheObjectTransformerManager transMgr;
@@ -213,7 +209,6 @@ public class GridCacheSharedContext<K, V> {
* @param jtaMgr JTA manager.
* @param storeSesLsnrs Store session listeners.
* @param mvccCachingMgr Mvcc caching manager.
- * @param deadlockDetectionMgr Deadlock detection manager.
*/
public GridCacheSharedContext(
GridKernalContext kernalCtx,
@@ -234,7 +229,6 @@ public class GridCacheSharedContext<K, V> {
CacheJtaManagerAdapter jtaMgr,
Collection<CacheStoreSessionListener> storeSesLsnrs,
MvccCachingManager mvccCachingMgr,
- DeadlockDetectionManager deadlockDetectionMgr,
CacheDiagnosticManager diagnosticMgr,
CacheObjectTransformerManager transMgr
) {
@@ -259,7 +253,6 @@ public class GridCacheSharedContext<K, V> {
ttlMgr,
evictMgr,
mvccCachingMgr,
- deadlockDetectionMgr,
diagnosticMgr,
transMgr
);
@@ -439,7 +432,6 @@ public class GridCacheSharedContext<K, V> {
ttlMgr,
evictMgr,
mvccCachingMgr,
- deadlockDetectionMgr,
diagnosticMgr,
transMgr
);
@@ -490,7 +482,6 @@ public class GridCacheSharedContext<K, V> {
GridCacheSharedTtlCleanupManager ttlMgr,
PartitionsEvictManager evictMgr,
MvccCachingManager mvccCachingMgr,
- DeadlockDetectionManager deadlockDetectionMgr,
CacheDiagnosticManager diagnosticMgr,
CacheObjectTransformerManager transMgr
) {
@@ -515,7 +506,6 @@ public class GridCacheSharedContext<K, V> {
this.ttlMgr = add(mgrs, ttlMgr);
this.evictMgr = add(mgrs, evictMgr);
this.mvccCachingMgr = add(mgrs, mvccCachingMgr);
- this.deadlockDetectionMgr = add(mgrs, deadlockDetectionMgr);
this.transMgr = add(mgrs, transMgr);
}
@@ -886,13 +876,6 @@ public class GridCacheSharedContext<K, V> {
return diagnosticMgr;
}
- /**
- * @return Deadlock detection manager.
- */
- public DeadlockDetectionManager deadlockDetectionMgr() {
- return deadlockDetectionMgr;
- }
-
/**
* @return Cache objects transformation manager.
*/
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ValidationOnNodeJoinUtils.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ValidationOnNodeJoinUtils.java
index c0c0125aa59..841a4b77e14 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ValidationOnNodeJoinUtils.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ValidationOnNodeJoinUtils.java
@@ -70,6 +70,7 @@ import org.apache.ignite.spi.encryption.EncryptionSpi;
import org.apache.ignite.spi.indexing.IndexingSpi;
import org.apache.ignite.spi.indexing.noop.NoopIndexingSpi;
import org.jetbrains.annotations.Nullable;
+
import static
org.apache.ignite.IgniteSystemProperties.IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
import static
org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
@@ -81,7 +82,7 @@ import static
org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_ASYNC;
import static org.apache.ignite.configuration.DeploymentMode.ISOLATED;
import static org.apache.ignite.configuration.DeploymentMode.PRIVATE;
import static
org.apache.ignite.internal.IgniteNodeAttributes.ATTR_CONSISTENCY_CHECK_SKIPPED;
-import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_TX_CONFIG;
+import static
org.apache.ignite.internal.IgniteNodeAttributes.ATTR_TX_SERIALIZABLE_ENABLED;
import static
org.apache.ignite.internal.processors.cache.GridCacheUtils.isDefaultDataRegionPersistent;
import static
org.apache.ignite.internal.processors.security.SecurityUtils.nodeSecurityContext;
@@ -621,53 +622,20 @@ public class ValidationOnNodeJoinUtils {
GridKernalContext ctx,
IgniteLogger log
) throws IgniteCheckedException {
- TransactionConfiguration rmtTxCfg = rmt.attribute(ATTR_TX_CONFIG);
+ Boolean rmtTxSer = rmt.attribute(ATTR_TX_SERIALIZABLE_ENABLED);
- if (rmtTxCfg != null) {
+ if (rmtTxSer != null) {
TransactionConfiguration locTxCfg =
ctx.config().getTransactionConfiguration();
- checkDeadlockDetectionConfig(rmt, rmtTxCfg, locTxCfg, log);
-
- checkSerializableEnabledConfig(rmt, rmtTxCfg, locTxCfg);
- }
- }
-
- /**
- *
- */
- private static void checkDeadlockDetectionConfig(
- ClusterNode rmt,
- TransactionConfiguration rmtTxCfg,
- TransactionConfiguration locTxCfg,
- IgniteLogger log
- ) {
- boolean locDeadlockDetectionEnabled = locTxCfg.getDeadlockTimeout() >
0;
- boolean rmtDeadlockDetectionEnabled = rmtTxCfg.getDeadlockTimeout() >
0;
-
- if (locDeadlockDetectionEnabled != rmtDeadlockDetectionEnabled) {
- U.warn(log, "Deadlock detection is enabled on one node and
disabled on another. " +
- "Disabled detection on one node can lead to undetected
deadlocks. [rmtNodeId=" + rmt.id() +
- ", locDeadlockTimeout=" + locTxCfg.getDeadlockTimeout() +
- ", rmtDeadlockTimeout=" + rmtTxCfg.getDeadlockTimeout());
+ if (!rmtTxSer.equals(locTxCfg.isTxSerializableEnabled()))
+ throw new IgniteCheckedException("Serializable transactions
enabled mismatch " +
+ "(fix txSerializableEnabled property or set -D" +
IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK + "=true " +
+ "system property) [rmtNodeId=" + rmt.id() +
+ ", locTxSerializableEnabled=" +
locTxCfg.isTxSerializableEnabled() +
+ ", rmtTxSerializableEnabled=" + rmtTxSer + ']');
}
}
- /**
- *
- */
- private static void checkSerializableEnabledConfig(
- ClusterNode rmt,
- TransactionConfiguration rmtTxCfg,
- TransactionConfiguration locTxCfg
- ) throws IgniteCheckedException {
- if (locTxCfg.isTxSerializableEnabled() !=
rmtTxCfg.isTxSerializableEnabled())
- throw new IgniteCheckedException("Serializable transactions
enabled mismatch " +
- "(fix txSerializableEnabled property or set -D" +
IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK + "=true " +
- "system property) [rmtNodeId=" + rmt.id() +
- ", locTxSerializableEnabled=" +
locTxCfg.isTxSerializableEnabled() +
- ", rmtTxSerializableEnabled=" +
rmtTxCfg.isTxSerializableEnabled() + ']');
- }
-
/**
* @param rmt Remote node to check.
* @param ctx Context.
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/DeadlockDetectionManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/DeadlockDetectionManager.java
deleted file mode 100644
index 880a4cc71bb..00000000000
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/DeadlockDetectionManager.java
+++ /dev/null
@@ -1,343 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.mvcc;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Optional;
-import java.util.Set;
-import java.util.UUID;
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.internal.IgniteInternalFuture;
-import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
-import
org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter;
-import
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocalAdapter;
-import
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxAbstractEnlistFuture;
-import
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal;
-import
org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
-import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
-import org.apache.ignite.internal.processors.timeout.GridTimeoutObjectAdapter;
-import
org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException;
-
-import static java.util.Collections.singleton;
-import static org.apache.ignite.internal.GridTopic.TOPIC_DEADLOCK_DETECTION;
-import static
org.apache.ignite.internal.managers.communication.GridIoPolicy.SYSTEM_POOL;
-import static
org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.belongToSameTx;
-
-/**
- * Component participating in deadlock detection in a cluster. Detection
process is collaborative and it is performed
- * by relaying special probe messages from waiting transaction to it's blocker.
- * <p>
- * Ideas for used detection algorithm are borrowed from Chandy-Misra-Haas
deadlock detection algorithm for resource
- * model.
- * <p>
- * Current implementation assumes that transactions obeys 2PL.
- */
-public class DeadlockDetectionManager extends GridCacheSharedManagerAdapter {
- /** */
- private long detectionStartDelay;
-
- /** {@inheritDoc} */
- @Override protected void start0() throws IgniteCheckedException {
- detectionStartDelay =
cctx.kernalContext().config().getTransactionConfiguration().getDeadlockTimeout();
-
- cctx.gridIO().addMessageListener(TOPIC_DEADLOCK_DETECTION, (nodeId,
msg, plc) -> {
- if (msg instanceof DeadlockProbe) {
- if (log.isDebugEnabled())
- log.debug("Received a probe message [msg=" + msg + ']');
-
- DeadlockProbe msg0 = (DeadlockProbe)msg;
-
- handleDeadlockProbe(msg0);
- }
- else
- log.warning("Unexpected message received [node=" + nodeId + ",
msg=" + msg + ']');
- });
- }
-
- /**
- * Starts a dedlock detection after a delay.
- *
- * @param waiterVer Version of the waiting transaction.
- * @param blockerVer Version of the waited for transaction.
- * @return Cancellable computation.
- */
- public DelayedDeadlockComputation initDelayedComputation(MvccVersion
waiterVer, MvccVersion blockerVer) {
- if (detectionStartDelay <= 0)
- return null;
-
- return new DelayedDeadlockComputation(waiterVer, blockerVer,
detectionStartDelay);
- }
-
- /**
- * Starts a deadlock detection for a given pair of transaction versions
(wait-for edge).
- *
- * @param waiterVer Version of the waiting transaction.
- * @param blockerVer Version of the waited for transaction.
- */
- private void startComputation(MvccVersion waiterVer, MvccVersion
blockerVer) {
- if (log.isDebugEnabled())
- log.debug("Starting deadlock detection [waiterVer=" + waiterVer +
", blockerVer=" + blockerVer + ']');
-
- Optional<GridDhtTxLocalAdapter> waitingTx = findTx(waiterVer);
-
- Optional<GridDhtTxLocalAdapter> blockerTx = findTx(blockerVer);
-
- if (waitingTx.isPresent() && blockerTx.isPresent()) {
- GridDhtTxLocalAdapter wTx = waitingTx.get();
-
- GridDhtTxLocalAdapter bTx = blockerTx.get();
-
- sendProbe(
- bTx.eventNodeId(),
- wTx.xidVersion(),
- // real start time will be filled later when corresponding
near node is visited
- singleton(new ProbedTx(wTx.nodeId(), wTx.xidVersion(),
wTx.nearXidVersion(), -1, wTx.lockCounter())),
- new ProbedTx(bTx.nodeId(), bTx.xidVersion(),
bTx.nearXidVersion(), -1, bTx.lockCounter()),
- true);
- }
- }
-
- /** */
- private Optional<GridDhtTxLocalAdapter> findTx(MvccVersion mvccVer) {
- return cctx.tm().activeTransactions().stream()
- .filter(tx -> tx.local() && tx.mvccSnapshot() != null)
- .filter(tx -> belongToSameTx(mvccVer, tx.mvccSnapshot()))
- .map(GridDhtTxLocalAdapter.class::cast)
- .findAny();
- }
-
- /**
- * Handles received deadlock probe. Possible outcomes:
- * <ol>
- * <li>Deadlock is found.</li>
- * <li>Probe is relayed to other blocking transactions.</li>
- * <li>Probe is discarded because receiving transaction is not
blocked.</li>
- * </ol>
- *
- * @param probe Received probe message.
- */
- private void handleDeadlockProbe(DeadlockProbe probe) {
- if (probe.nearCheck())
- handleDeadlockProbeForNear(probe);
- else
- handleDeadlockProbeForDht(probe);
- }
-
- /** */
- private void handleDeadlockProbeForNear(DeadlockProbe probe) {
- // a probe is simply discarded if next wait-for edge is not found
- ProbedTx blocker = probe.blocker();
-
- GridNearTxLocal nearTx = cctx.tm().tx(blocker.nearXidVersion());
-
- if (nearTx == null)
- return;
-
- // probe each blocker
- for (UUID pendingNodeId : getPendingResponseNodes(nearTx)) {
- sendProbe(
- pendingNodeId,
- probe.initiatorVersion(),
- probe.waitChain(),
- // real start time is filled here
- blocker.withStartTime(nearTx.startTime()),
- false);
- }
- }
-
- /** */
- private void handleDeadlockProbeForDht(DeadlockProbe probe) {
- // a probe is simply discarded if next wait-for edge is not found
- cctx.tm().activeTransactions().stream()
- .filter(IgniteInternalTx::local)
- .filter(tx ->
tx.nearXidVersion().equals(probe.blocker().nearXidVersion()))
- .findAny()
- .map(GridDhtTxLocalAdapter.class::cast)
- .ifPresent(tx -> {
- // search for locally checked tx (identified as blocker
previously) in the wait chain
- Optional<ProbedTx> repeatedTx = probe.waitChain().stream()
- .filter(wTx -> wTx.xidVersion().equals(tx.xidVersion()))
- .findAny();
-
- if (repeatedTx.isPresent()) {
- // a deadlock found
- resolveDeadlock(probe, repeatedTx.get(), tx);
- }
- else
- relayProbeIfLocalTxIsWaiting(probe, tx);
- });
- }
-
- /** */
- private void resolveDeadlock(DeadlockProbe probe, ProbedTx repeatedTx,
GridDhtTxLocalAdapter locTx) {
- if (log.isDebugEnabled())
- log.debug("Deadlock detected [probe=" + probe + ']');
-
- ProbedTx victim = chooseVictim(
- // real start time is filled here for repeated tx
- repeatedTx.withStartTime(probe.blocker().startTime()),
- probe.waitChain());
-
- if (victim.xidVersion().equals(locTx.xidVersion())) {
- if (log.isDebugEnabled())
- log.debug("Chosen victim is on local node, tx will be aborted
[victim=" + victim + ']');
-
- // if a victim tx has made a progress since it was identified as
waiting
- // it means that detected deadlock was broken by other means (e.g.
timeout of another tx)
- if (victim.lockCounter() == locTx.lockCounter())
- abortTx(locTx);
- }
- else {
- if (log.isDebugEnabled())
- log.debug("Chosen victim is on remote node, message will be
sent [victim=" + victim + ']');
-
- // destination node must determine itself as a victim
- sendProbe(victim.nodeId(), probe.initiatorVersion(),
singleton(victim), victim, false);
- }
- }
-
- /** */
- private void relayProbeIfLocalTxIsWaiting(DeadlockProbe probe,
GridDhtTxLocalAdapter locTx) {
- assert locTx.mvccSnapshot() != null;
-
- cctx.coordinators().checkWaiting(locTx.mvccSnapshot())
- .flatMap(this::findTx)
- .ifPresent(nextBlocker -> {
- ArrayList<ProbedTx> waitChain = new
ArrayList<>(probe.waitChain().size() + 1);
- waitChain.addAll(probe.waitChain());
- // real start time is filled here
- waitChain.add(new ProbedTx(locTx.nodeId(), locTx.xidVersion(),
locTx.nearXidVersion(),
- probe.blocker().startTime(), locTx.lockCounter()));
-
- // real start time will be filled later when corresponding
near node is visited
- ProbedTx nextProbedTx = new ProbedTx(nextBlocker.nodeId(),
nextBlocker.xidVersion(),
- nextBlocker.nearXidVersion(), -1,
nextBlocker.lockCounter());
-
- sendProbe(
- nextBlocker.eventNodeId(),
- probe.initiatorVersion(),
- waitChain,
- nextProbedTx,
- true);
- });
- }
-
- /**
- * Chooses victim basing on tx start time. Algorithm chooses victim in
such way that every site detected a deadlock
- * will choose the same victim. As a result only one tx participating in a
deadlock will be aborted.
- * <p>
- * Local tx is needed here because start time for it might not be filled
yet for corresponding entry in wait chain.
- *
- * @param locTx Deadlocked tx on local node.
- * @param waitChain Wait chain.
- * @return Tx chosen as a victim.
- */
- @SuppressWarnings("StatementWithEmptyBody")
- private ProbedTx chooseVictim(ProbedTx locTx, Collection<ProbedTx>
waitChain) {
- Iterator<ProbedTx> it = waitChain.iterator();
-
- // skip until local tx (inclusive), because txs before are not
deadlocked
- while (it.hasNext() &&
!it.next().xidVersion().equals(locTx.xidVersion()));
-
- ProbedTx victim = locTx;
- long maxStartTime = locTx.startTime();
-
- while (it.hasNext()) {
- ProbedTx tx = it.next();
-
- // seek for youngest tx in order to guarantee forward progress
- if (tx.startTime() > maxStartTime) {
- maxStartTime = tx.startTime();
- victim = tx;
- }
- // tie-breaking
- else if (tx.startTime() == maxStartTime &&
tx.nearXidVersion().compareTo(victim.nearXidVersion()) > 0)
- victim = tx;
- }
-
- return victim;
- }
-
- /** */
- private void abortTx(GridDhtTxLocalAdapter tx) {
- cctx.coordinators().failWaiter(tx.mvccSnapshot(), new
IgniteTxRollbackCheckedException(
- "Deadlock detected. Transaction will be rolled back [tx=" + tx +
']'));
- }
-
- /** */
- private Set<UUID> getPendingResponseNodes(GridNearTxLocal tx) {
- IgniteInternalFuture lockFut = tx.lockFuture();
-
- if (lockFut instanceof GridNearTxAbstractEnlistFuture)
- return
((GridNearTxAbstractEnlistFuture<?>)lockFut).pendingResponseNodes();
-
- return Collections.emptySet();
- }
-
- /** */
- private void sendProbe(UUID destNodeId, GridCacheVersion initiatorVer,
Collection<ProbedTx> waitChain,
- ProbedTx blocker, boolean near) {
-
- DeadlockProbe probe = new DeadlockProbe(initiatorVer, waitChain,
blocker, near);
-
- if (log.isDebugEnabled())
- log.debug("Sending probe [probe=" + probe + ", destNode=" +
destNodeId + ']');
-
- try {
- cctx.gridIO().sendToGridTopic(destNodeId,
TOPIC_DEADLOCK_DETECTION, probe, SYSTEM_POOL);
- }
- catch (ClusterTopologyCheckedException ignored) {
- }
- catch (IgniteCheckedException e) {
- log.warning("Failed to send a deadlock probe [nodeId=" +
destNodeId + ']', e);
- }
- }
-
- /**
- * Delayed deadlock probe computation which can be cancelled.
- */
- public class DelayedDeadlockComputation extends GridTimeoutObjectAdapter {
- /** */
- private final MvccVersion waiterVer;
-
- /** */
- private final MvccVersion blockerVer;
-
- /** {@inheritDoc} */
- @Override public void onTimeout() {
- startComputation(waiterVer, blockerVer);
- }
-
- /** */
- private DelayedDeadlockComputation(MvccVersion waiterVer, MvccVersion
blockerVer, long timeout) {
- super(timeout);
- this.waiterVer = waiterVer;
- this.blockerVer = blockerVer;
-
- cctx.kernalContext().timeout().addTimeoutObject(this);
- }
-
- /** */
- public void cancel() {
- cctx.kernalContext().timeout().removeTimeoutObject(this);
- }
- }
-}
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/DeadlockProbe.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/DeadlockProbe.java
deleted file mode 100644
index 582465c804e..00000000000
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/DeadlockProbe.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.mvcc;
-
-import java.nio.ByteBuffer;
-import java.util.Collection;
-import org.apache.ignite.internal.GridDirectCollection;
-import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
-import org.apache.ignite.internal.util.tostring.GridToStringInclude;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.plugin.extensions.communication.Message;
-import
org.apache.ignite.plugin.extensions.communication.MessageCollectionItemType;
-import org.apache.ignite.plugin.extensions.communication.MessageReader;
-import org.apache.ignite.plugin.extensions.communication.MessageWriter;
-
-/**
- * Probe message travelling between transactions (from waiting to blocking)
during deadlock detection.
- * @see DeadlockDetectionManager
- */
-public class DeadlockProbe implements Message {
- /** */
- private static final long serialVersionUID = 0;
-
- /** */
- private GridCacheVersion initiatorVer;
-
- /** */
- @GridToStringInclude
- @GridDirectCollection(ProbedTx.class)
- private Collection<ProbedTx> waitChain;
-
- /** */
- private ProbedTx blocker;
-
- /** */
- private boolean nearCheck;
-
- /** */
- public DeadlockProbe() {
- }
-
- /** */
- @SuppressWarnings("AssignmentOrReturnOfFieldWithMutableType")
- public DeadlockProbe(GridCacheVersion initiatorVer, Collection<ProbedTx>
waitChain,
- ProbedTx blocker, boolean nearCheck) {
- this.initiatorVer = initiatorVer;
- this.waitChain = waitChain;
- this.blocker = blocker;
- this.nearCheck = nearCheck;
- }
-
- /**
- * @return Identifier of a transaction started a deadlock detection
process. Can be used for diagnostics.
- */
- public GridCacheVersion initiatorVersion() {
- return initiatorVer;
- }
-
- /**
- * @return Chain of transactions identified as waiting during deadlock
detection.
- */
- @SuppressWarnings("AssignmentOrReturnOfFieldWithMutableType")
- public Collection<ProbedTx> waitChain() {
- return waitChain;
- }
-
- /**
- * @return Identifier of a transaction identified as blocking last
transaction in the wait chain
- * during deadlock deteciton.
- */
- public ProbedTx blocker() {
- return blocker;
- }
-
- /**
- * @return {@code True} if checks if near transaction is waiting. {@code
False} if checks dht transaction.
- */
- public boolean nearCheck() {
- return nearCheck;
- }
-
- /** {@inheritDoc} */
- @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
- writer.setBuffer(buf);
-
- if (!writer.isHeaderWritten()) {
- if (!writer.writeHeader(directType(), fieldsCount()))
- return false;
-
- writer.onHeaderWritten();
- }
-
- switch (writer.state()) {
- case 0:
- if (!writer.writeMessage("blocker", blocker))
- return false;
-
- writer.incrementState();
-
- case 1:
- if (!writer.writeMessage("initiatorVer", initiatorVer))
- return false;
-
- writer.incrementState();
-
- case 2:
- if (!writer.writeBoolean("nearCheck", nearCheck))
- return false;
-
- writer.incrementState();
-
- case 3:
- if (!writer.writeCollection("waitChain", waitChain,
MessageCollectionItemType.MSG))
- return false;
-
- writer.incrementState();
-
- }
-
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
- reader.setBuffer(buf);
-
- if (!reader.beforeMessageRead())
- return false;
-
- switch (reader.state()) {
- case 0:
- blocker = reader.readMessage("blocker");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 1:
- initiatorVer = reader.readMessage("initiatorVer");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 2:
- nearCheck = reader.readBoolean("nearCheck");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 3:
- waitChain = reader.readCollection("waitChain",
MessageCollectionItemType.MSG);
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- }
-
- return reader.afterMessageRead(DeadlockProbe.class);
- }
-
- /** {@inheritDoc} */
- @Override public short directType() {
- return 170;
- }
-
- /** {@inheritDoc} */
- @Override public byte fieldsCount() {
- return 4;
- }
-
- /** {@inheritDoc} */
- @Override public void onAckReceived() {
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(DeadlockProbe.class, this);
- }
-}
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java
index 6ebcca49ed2..7c6e9deadf5 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java
@@ -711,13 +711,6 @@ public class MvccProcessorImpl extends
GridProcessorAdapter implements MvccProce
if (!waiter.hasLocalTransaction() && (waiter = waitMap.remove(key)) !=
null)
waiter.run(ctx);
- else {
- DeadlockDetectionManager.DelayedDeadlockComputation
delayedComputation
- =
ctx.cache().context().deadlockDetectionMgr().initDelayedComputation(waiterVer,
blockerVer);
-
- if (delayedComputation != null)
- fut.listen(delayedComputation::cancel);
- }
return fut;
}
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/ProbedTx.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/ProbedTx.java
deleted file mode 100644
index 879fbd0520c..00000000000
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/ProbedTx.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.mvcc;
-
-import java.nio.ByteBuffer;
-import java.util.UUID;
-import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.plugin.extensions.communication.Message;
-import org.apache.ignite.plugin.extensions.communication.MessageReader;
-import org.apache.ignite.plugin.extensions.communication.MessageWriter;
-
-/**
- * Contains attributes of tx visited during deadlock detection.
- */
-public class ProbedTx implements Message {
- /** */
- private static final long serialVersionUID = 0;
-
- /** */
- private UUID nodeId;
-
- /** */
- private GridCacheVersion xidVer;
-
- /** */
- private GridCacheVersion nearXidVer;
-
- /** */
- private long startTime;
-
- /** */
- private int lockCntr;
-
- /** */
- public ProbedTx() {
- }
-
- /**
- * @param nodeId Node on which probed transaction runs.
- * @param xidVer Identifier of transaction.
- * @param nearXidVer Identifier of near transaction.
- * @param startTime Transaction start time.
- * @param lockCntr Number of locks acquired by probed transaction at a
time of probe handling.
- */
- public ProbedTx(UUID nodeId, GridCacheVersion xidVer, GridCacheVersion
nearXidVer, long startTime,
- int lockCntr) {
- this.nodeId = nodeId;
- this.xidVer = xidVer;
- this.nearXidVer = nearXidVer;
- this.startTime = startTime;
- this.lockCntr = lockCntr;
- }
-
- /**
- * @return Node on which probed transaction runs.
- */
- public UUID nodeId() {
- return nodeId;
- }
-
- /**
- * @return Identifier of transaction.
- */
- public GridCacheVersion xidVersion() {
- return xidVer;
- }
-
- /**
- * @return Identifier of near transaction.
- */
- public GridCacheVersion nearXidVersion() {
- return nearXidVer;
- }
-
- /**
- * @return Transaction start time.
- */
- public long startTime() {
- return startTime;
- }
-
- /**
- * @return Number of locks acquired by probed transaction at a time of
probe handling.
- */
- public int lockCounter() {
- return lockCntr;
- }
-
- /**
- * Creates a copy of this instance with modified transaction start time.
- *
- * @param updStartTime New start time value.
- * @return Instance with updated start time.
- */
- public ProbedTx withStartTime(long updStartTime) {
- return new ProbedTx(
- nodeId,
- xidVer,
- nearXidVer,
- updStartTime,
- lockCntr
- );
- }
-
- /** {@inheritDoc} */
- @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
- writer.setBuffer(buf);
-
- if (!writer.isHeaderWritten()) {
- if (!writer.writeHeader(directType(), fieldsCount()))
- return false;
-
- writer.onHeaderWritten();
- }
-
- switch (writer.state()) {
- case 0:
- if (!writer.writeInt("lockCntr", lockCntr))
- return false;
-
- writer.incrementState();
-
- case 1:
- if (!writer.writeMessage("nearXidVer", nearXidVer))
- return false;
-
- writer.incrementState();
-
- case 2:
- if (!writer.writeUuid("nodeId", nodeId))
- return false;
-
- writer.incrementState();
-
- case 3:
- if (!writer.writeLong("startTime", startTime))
- return false;
-
- writer.incrementState();
-
- case 4:
- if (!writer.writeMessage("xidVer", xidVer))
- return false;
-
- writer.incrementState();
-
- }
-
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
- reader.setBuffer(buf);
-
- if (!reader.beforeMessageRead())
- return false;
-
- switch (reader.state()) {
- case 0:
- lockCntr = reader.readInt("lockCntr");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 1:
- nearXidVer = reader.readMessage("nearXidVer");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 2:
- nodeId = reader.readUuid("nodeId");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 3:
- startTime = reader.readLong("startTime");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 4:
- xidVer = reader.readMessage("xidVer");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- }
-
- return reader.afterMessageRead(ProbedTx.class);
- }
-
- /** {@inheritDoc} */
- @Override public short directType() {
- return 171;
- }
-
- /** {@inheritDoc} */
- @Override public byte fieldsCount() {
- return 5;
- }
-
- /** {@inheritDoc} */
- @Override public void onAckReceived() {
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(ProbedTx.class, this);
- }
-}
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
index 157a1ea5c57..ff7bc60d947 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
@@ -2557,7 +2557,7 @@ public class IgniteSnapshotManager extends
GridCacheSharedManagerAdapter
GridCacheSharedContext<?, ?> sctx = new GridCacheSharedContext<>(ctx,
null, null, null,
null, null, null, null, null,
null, null, null, null, null,
- null, null, null, null, null, null, null);
+ null, null, null, null, null, null);
return new DataPageIterator(sctx, coctx, pageStore, partId);
}
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/IgniteWalIteratorFactory.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/IgniteWalIteratorFactory.java
index 15a43b5a659..05c40db53bd 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/IgniteWalIteratorFactory.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/IgniteWalIteratorFactory.java
@@ -405,7 +405,7 @@ public class IgniteWalIteratorFactory {
kernalCtx, null, null, null,
null, null, null, dbMgr, null,
null, null, null, null, null,
- null, null, null, null, null, null, null
+ null, null, null, null, null, null
);
}
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
index baf18e59b82..1e5d0be4113 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
@@ -115,6 +115,7 @@ import org.apache.ignite.ssl.SslContextFactory;
import org.apache.ignite.transactions.TransactionConcurrency;
import org.apache.ignite.transactions.TransactionIsolation;
import org.apache.ignite.util.AttributeNodeFilter;
+
import static java.util.Optional.ofNullable;
/**
@@ -885,7 +886,6 @@ public class PlatformConfigurationUtils {
tx.setDefaultTxTimeout(in.readLong());
tx.setPessimisticTxLogLinger(in.readInt());
tx.setTxTimeoutOnPartitionMapExchange(in.readLong());
- tx.setDeadlockTimeout(in.readLong());
cfg.setTransactionConfiguration(tx);
}
@@ -1503,7 +1503,6 @@ public class PlatformConfigurationUtils {
w.writeLong(tx.getDefaultTxTimeout());
w.writeInt(tx.getPessimisticTxLogLinger());
w.writeLong(tx.getTxTimeoutOnPartitionMapExchange());
- w.writeLong(tx.getDeadlockTimeout());
}
else
w.writeBoolean(false);
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/top/GridTopologyCommandHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/top/GridTopologyCommandHandler.java
index 7b0d046115b..3323e0b07ec 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/top/GridTopologyCommandHandler.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/top/GridTopologyCommandHandler.java
@@ -59,7 +59,7 @@ import static
org.apache.ignite.internal.IgniteNodeAttributes.ATTR_REST_TCP_HOST
import static
org.apache.ignite.internal.IgniteNodeAttributes.ATTR_REST_TCP_PORT;
import static
org.apache.ignite.internal.IgniteNodeAttributes.ATTR_SECURITY_CREDENTIALS;
import static
org.apache.ignite.internal.IgniteNodeAttributes.ATTR_SECURITY_SUBJECT_V2;
-import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_TX_CONFIG;
+import static
org.apache.ignite.internal.IgniteNodeAttributes.ATTR_TX_SERIALIZABLE_ENABLED;
import static org.apache.ignite.internal.processors.rest.GridRestCommand.NODE;
import static
org.apache.ignite.internal.processors.rest.GridRestCommand.TOPOLOGY;
import static org.apache.ignite.internal.util.IgniteUtils.IGNITE_PKG;
@@ -291,7 +291,7 @@ public class GridTopologyCommandHandler extends
GridRestCommandHandlerAdapter {
Map<String, Object> attrs = new HashMap<>(node.attributes());
attrs.remove(ATTR_CACHE);
- attrs.remove(ATTR_TX_CONFIG);
+ attrs.remove(ATTR_TX_SERIALIZABLE_ENABLED);
attrs.remove(ATTR_SECURITY_SUBJECT_V2);
attrs.remove(ATTR_SECURITY_CREDENTIALS);
attrs.remove(ATTR_BINARY_CONFIGURATION);
diff --git
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorSwitchSegmentTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorSwitchSegmentTest.java
index 724a500a076..340a8a4b534 100644
---
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorSwitchSegmentTest.java
+++
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorSwitchSegmentTest.java
@@ -183,7 +183,6 @@ public class IgniteWalIteratorSwitchSegmentTest extends
GridCommonAbstractTest {
null,
null,
null,
- null,
null)
).createSerializer(serVer);
@@ -479,7 +478,6 @@ public class IgniteWalIteratorSwitchSegmentTest extends
GridCommonAbstractTest {
null,
null,
null,
- null,
null
);
diff --git
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/BPlusTreePageMemoryImplTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/BPlusTreePageMemoryImplTest.java
index 42339ada610..0d25bd5442e 100644
---
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/BPlusTreePageMemoryImplTest.java
+++
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/BPlusTreePageMemoryImplTest.java
@@ -95,7 +95,6 @@ public class BPlusTreePageMemoryImplTest extends
BPlusTreeSelfTest {
null,
null,
null,
- null,
new CacheDiagnosticManager(),
null
);
diff --git
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/BPlusTreeReuseListPageMemoryImplTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/BPlusTreeReuseListPageMemoryImplTest.java
index d3a2718401d..16ddf83119e 100644
---
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/BPlusTreeReuseListPageMemoryImplTest.java
+++
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/BPlusTreeReuseListPageMemoryImplTest.java
@@ -95,7 +95,6 @@ public class BPlusTreeReuseListPageMemoryImplTest extends
BPlusTreeReuseSelfTest
null,
null,
null,
- null,
null
);
diff --git
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/IndexStoragePageMemoryImplTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/IndexStoragePageMemoryImplTest.java
index 763abc787fd..0e92905efaf 100644
---
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/IndexStoragePageMemoryImplTest.java
+++
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/IndexStoragePageMemoryImplTest.java
@@ -110,7 +110,6 @@ public class IndexStoragePageMemoryImplTest extends
IndexStorageSelfTest {
null,
null,
null,
- null,
new CacheDiagnosticManager(),
null
);
diff --git
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java
index df0bd11eb11..b67cc8aca89 100644
---
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java
+++
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java
@@ -100,7 +100,6 @@ public class PageMemoryImplNoLoadTest extends
PageMemoryNoLoadSelfTest {
null,
null,
null,
- null,
null
);
diff --git
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java
index ff8f98ef2c6..8090393028d 100644
---
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java
+++
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java
@@ -631,7 +631,6 @@ public class PageMemoryImplTest extends
GridCommonAbstractTest {
null,
null,
null,
- null,
null
);
diff --git
a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
index 6d21728e87c..1a632db0fc1 100644
---
a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
+++
b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
@@ -83,7 +83,6 @@ public class GridCacheTestContext<K, V> extends
GridCacheContext<K, V> {
new CacheNoopJtaManager(),
null,
null,
- null,
new CacheDiagnosticManager(),
null
),
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
index 8df7aa33d1c..7e95ee85cda 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
@@ -488,7 +488,6 @@ namespace Apache.Ignite.Core
writer.WriteLong((long)
TransactionConfiguration.DefaultTimeout.TotalMilliseconds);
writer.WriteInt((int)
TransactionConfiguration.PessimisticTransactionLogLinger.TotalMilliseconds);
writer.WriteLong((long)
TransactionConfiguration.DefaultTimeoutOnPartitionMapExchange.TotalMilliseconds);
- writer.WriteLong((long)
TransactionConfiguration.DeadlockTimeout.TotalMilliseconds);
}
else
writer.WriteBoolean(false);
@@ -825,7 +824,6 @@ namespace Apache.Ignite.Core
DefaultTimeout = TimeSpan.FromMilliseconds(r.ReadLong()),
PessimisticTransactionLogLinger =
TimeSpan.FromMilliseconds(r.ReadInt()),
DefaultTimeoutOnPartitionMapExchange =
TimeSpan.FromMilliseconds(r.ReadLong()),
- DeadlockTimeout = TimeSpan.FromMilliseconds(r.ReadLong())
};
}
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
index 1b95ed09ae0..7ca5b11c7a2 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
@@ -1370,13 +1370,6 @@
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="deadlockTimeout" type="xs:string">
- <xs:annotation>
- <xs:documentation>
- Timeout before starting deadlock
detection. TimeSpan.Zero for disabling deadlock detection.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="logger" minOccurs="0">
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core/Transactions/TransactionConfiguration.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Transactions/TransactionConfiguration.cs
index 77c1e881b55..31006c92529 100644
---
a/modules/platforms/dotnet/Apache.Ignite.Core/Transactions/TransactionConfiguration.cs
+++
b/modules/platforms/dotnet/Apache.Ignite.Core/Transactions/TransactionConfiguration.cs
@@ -44,9 +44,6 @@ namespace Apache.Ignite.Core.Transactions
/// <summary> The default value for <see
cref="DefaultTimeoutOnPartitionMapExchange"/></summary>
public static readonly TimeSpan
DefaultDefaultTimeoutOnPartitionMapExchange = TimeSpan.Zero;
- /// <summary> The default value for <see
cref="DeadlockTimeout"/></summary>
- public static readonly TimeSpan DefaultDeadlockTimeout =
TimeSpan.FromSeconds(10);
-
/// <summary>
/// Gets or sets the cache transaction concurrency to use when one is
not explicitly specified.
/// </summary>
@@ -87,17 +84,6 @@ namespace Apache.Ignite.Core.Transactions
[DefaultValue(typeof(TimeSpan), "00:00:00")]
public TimeSpan DefaultTimeoutOnPartitionMapExchange { get; set; }
- /// <summary>
- /// This is an experimental feature. Transactional SQL is currently in
a beta status.
- /// <para/>
- /// Gets or sets timeout before starting deadlock detection for caches
configured with
- /// <code>TransactionalSnapshot</code> cache atomicity mode.
- /// <see cref="TimeSpan.Zero"/> for disabling deadlock detection.
- /// </summary>
- [DefaultValue(typeof(TimeSpan), "00:00:10")]
- [IgniteExperimental]
- public TimeSpan DeadlockTimeout { get; set; }
-
/// <summary>
/// Initializes a new instance of the <see
cref="TransactionConfiguration" /> class.
/// </summary>
@@ -109,7 +95,6 @@ namespace Apache.Ignite.Core.Transactions
PessimisticTransactionLogSize =
DefaultPessimisticTransactionLogSize;
PessimisticTransactionLogLinger =
DefaultPessimisticTransactionLogLinger;
DefaultTimeoutOnPartitionMapExchange =
DefaultDefaultTimeoutOnPartitionMapExchange;
- DeadlockTimeout = DefaultDeadlockTimeout;
}
}
}