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 5eab58fcb4c IGNITE-20088 GridDhtTxRemote initial cleanup (#10862) 5eab58fcb4c is described below commit 5eab58fcb4c07dbadb0c3d0742f1ca4240d54b72 Author: Anton Vinogradov <a...@apache.org> AuthorDate: Tue Aug 1 13:41:20 2023 +0300 IGNITE-20088 GridDhtTxRemote initial cleanup (#10862) --- .../dht/GridDhtTransactionalCacheAdapter.java | 2 -- .../cache/distributed/dht/GridDhtTxRemote.java | 40 ++++------------------ .../distributed/near/GridNearTxEnlistFuture.java | 1 - .../near/GridNearTxQueryResultsEnlistFuture.java | 1 - .../cache/transactions/IgniteTxHandler.java | 1 - 5 files changed, 7 insertions(+), 38 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java index 5c2e241e247..427e78b1076 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java @@ -281,7 +281,6 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach tx = new GridDhtTxRemote( ctx.shared(), req.nodeId(), - req.futureId(), nodeId, req.nearXidVersion(), req.topologyVersion(), @@ -2230,7 +2229,6 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach tx = new GridDhtTxRemote(ctx.shared(), req0.nearNodeId(), - req0.dhtFutureId(), primary, req0.nearXidVersion(), req0.topologyVersion(), diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java index 326641abd11..4685034a601 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java @@ -39,7 +39,6 @@ import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.apache.ignite.internal.util.tostring.GridToStringBuilder; import org.apache.ignite.internal.util.typedef.T2; import org.apache.ignite.internal.util.typedef.internal.U; -import org.apache.ignite.lang.IgniteUuid; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; @@ -52,23 +51,19 @@ import static org.apache.ignite.internal.processors.cache.GridCacheUtils.isNearE */ public class GridDhtTxRemote extends GridDistributedTxRemoteAdapter { /** Near node ID. */ - private UUID nearNodeId; - - /** Remote future ID. */ - private IgniteUuid rmtFutId; + private final UUID nearNodeId; /** Near transaction ID. */ - private GridCacheVersion nearXidVer; + private final GridCacheVersion nearXidVer; /** Store write through flag. */ - private boolean storeWriteThrough; + private final boolean storeWriteThrough; /** * This constructor is meant for optimistic transactions. * * @param ctx Cache context. * @param nearNodeId Near node ID. - * @param rmtFutId Remote future ID. * @param nodeId Node ID. * @param topVer Topology version. * @param xidVer XID version. @@ -87,7 +82,6 @@ public class GridDhtTxRemote extends GridDistributedTxRemoteAdapter { public GridDhtTxRemote( GridCacheSharedContext ctx, UUID nearNodeId, - IgniteUuid rmtFutId, UUID nodeId, AffinityTopologyVersion topVer, GridCacheVersion xidVer, @@ -124,18 +118,16 @@ public class GridDhtTxRemote extends GridDistributedTxRemoteAdapter { ); assert nearNodeId != null; - assert rmtFutId != null; this.nearNodeId = nearNodeId; - this.rmtFutId = rmtFutId; this.nearXidVer = nearXidVer; this.txNodes = txNodes; this.storeWriteThrough = storeWriteThrough; txState = single ? new IgniteTxRemoteSingleStateImpl() : new IgniteTxRemoteStateImpl( - Collections.<IgniteTxKey, IgniteTxEntry>emptyMap(), - new ConcurrentLinkedHashMap<IgniteTxKey, IgniteTxEntry>(U.capacity(txSize), 0.75f, 1)); + Collections.emptyMap(), + new ConcurrentLinkedHashMap<>(U.capacity(txSize), 0.75f, 1)); assert topVer != null && topVer.topologyVersion() > 0 : topVer; @@ -147,7 +139,6 @@ public class GridDhtTxRemote extends GridDistributedTxRemoteAdapter { * * @param ctx Cache context. * @param nearNodeId Near node ID. - * @param rmtFutId Remote future ID. * @param nodeId Node ID. * @param nearXidVer Near transaction ID. * @param topVer Topology version. @@ -165,7 +156,6 @@ public class GridDhtTxRemote extends GridDistributedTxRemoteAdapter { public GridDhtTxRemote( GridCacheSharedContext ctx, UUID nearNodeId, - IgniteUuid rmtFutId, UUID nodeId, GridCacheVersion nearXidVer, AffinityTopologyVersion topVer, @@ -200,29 +190,20 @@ public class GridDhtTxRemote extends GridDistributedTxRemoteAdapter { ); assert nearNodeId != null; - assert rmtFutId != null; this.nearXidVer = nearXidVer; this.nearNodeId = nearNodeId; - this.rmtFutId = rmtFutId; this.storeWriteThrough = storeWriteThrough; txState = new IgniteTxRemoteStateImpl( - Collections.<IgniteTxKey, IgniteTxEntry>emptyMap(), - new ConcurrentLinkedHashMap<IgniteTxKey, IgniteTxEntry>(U.capacity(txSize), 0.75f, 1)); + Collections.emptyMap(), + new ConcurrentLinkedHashMap<>(U.capacity(txSize), 0.75f, 1)); assert topVer != null && topVer.topologyVersion() > 0 : topVer; topologyVersion(topVer); } - /** - * @param txNodes Transaction nodes. - */ - @Override public void transactionNodes(Map<UUID, Collection<UUID>> txNodes) { - this.txNodes = txNodes; - } - /** {@inheritDoc} */ @Override public boolean remote() { return true; @@ -270,13 +251,6 @@ public class GridDhtTxRemote extends GridDistributedTxRemoteAdapter { return nearNodeId; } - /** - * @return Remote future ID. - */ - IgniteUuid remoteFutureId() { - return rmtFutId; - } - /** {@inheritDoc} */ @Override protected boolean updateNearCache(GridCacheContext cacheCtx, KeyCacheObject key, AffinityTopologyVersion topVer) { if (!cacheCtx.isDht() || !isNearEnabled(cacheCtx) || cctx.localNodeId().equals(nearNodeId)) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java index 23b75019fb5..ef50f612590 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java @@ -376,7 +376,6 @@ public class GridNearTxEnlistFuture extends GridNearTxAbstractEnlistFuture<GridC if (dhtTx == null) { dhtTx = new GridDhtTxRemote(cctx.shared(), cctx.localNodeId(), - dhtFutId, primaryId, lockVer, topVer, diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java index 255c0ca31be..959f7468612 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java @@ -342,7 +342,6 @@ public class GridNearTxQueryResultsEnlistFuture extends GridNearTxQueryAbstractE if (dhtTx == null) { dhtTx = new GridDhtTxRemote(cctx.shared(), cctx.localNodeId(), - dhtFutId, primaryId, lockVer, topVer, diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java index 4f8ef80316e..c503957b838 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java @@ -1758,7 +1758,6 @@ public class IgniteTxHandler { tx = new GridDhtTxRemote( ctx, req.nearNodeId(), - req.futureId(), nodeId, req.topologyVersion(), req.version(),