IGNITE-21345 TxState and MvccSnapshot removal (#11323)
diff --git a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionContext.java b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionContext.java
index 1ed1091..39a865e 100644
--- a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionContext.java
+++ b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionContext.java
@@ -30,7 +30,6 @@
import org.apache.ignite.IgniteException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactory;
import org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl;
import org.apache.ignite.internal.processors.query.calcite.exec.tracker.ExecutionNodeMemoryTracker;
@@ -197,13 +196,6 @@
}
/**
- * @return MVCC snapshot.
- */
- public MvccSnapshot mvccSnapshot() {
- return null; // TODO
- }
-
- /**
* @return Handler to access row fields.
*/
public RowHandler<Row> rowHandler() {
diff --git a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/IndexFirstLastScan.java b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/IndexFirstLastScan.java
index cc1b8d7..bcc656d 100644
--- a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/IndexFirstLastScan.java
+++ b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/IndexFirstLastScan.java
@@ -58,8 +58,7 @@
return new IndexQueryContext(
res.cacheFilter(),
- createNotNullRowFilter(idx, true),
- res.mvccSnapshot()
+ createNotNullRowFilter(idx, true)
);
}
diff --git a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/IndexScan.java b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/IndexScan.java
index af8aaf4..d69d7c4 100644
--- a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/IndexScan.java
+++ b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/IndexScan.java
@@ -44,7 +44,6 @@
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionTopology;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree;
import org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusIO;
import org.apache.ignite.internal.processors.query.calcite.exec.RowHandler.RowFactory;
@@ -82,9 +81,6 @@
private final int[] parts;
/** */
- private final MvccSnapshot mvccSnapshot;
-
- /** */
private volatile List<GridDhtLocalPartition> reserved;
/** */
@@ -152,7 +148,6 @@
factory = ectx.rowHandler().factory(ectx.getTypeFactory(), rowType);
topVer = ectx.topologyVersion();
this.parts = parts;
- mvccSnapshot = ectx.mvccSnapshot();
this.requiredColumns = requiredColumns;
this.idxFieldMapping = idxFieldMapping;
@@ -372,7 +367,7 @@
BPlusTree.TreeRowClosure<IndexRow, IndexRow> rowFilter = isInlineScan() ? null : createNotExpiredRowFilter();
- return new IndexQueryContext(filter, rowFilter, rowFactory, mvccSnapshot);
+ return new IndexQueryContext(filter, rowFilter, rowFactory);
}
/** */
diff --git a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/TableScan.java b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/TableScan.java
index 4e1d15f..f70d082 100644
--- a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/TableScan.java
+++ b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/TableScan.java
@@ -34,7 +34,6 @@
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionTopology;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
import org.apache.ignite.internal.processors.query.calcite.exec.RowHandler.RowFactory;
import org.apache.ignite.internal.processors.query.calcite.schema.CacheTableDescriptor;
@@ -65,9 +64,6 @@
private final int[] parts;
/** */
- private final MvccSnapshot mvccSnapshot;
-
- /** */
private volatile List<GridDhtLocalPartition> reserved;
/** Participating colunms. */
@@ -90,7 +86,6 @@
factory = this.ectx.rowHandler().factory(this.ectx.getTypeFactory(), rowType);
topVer = ectx.topologyVersion();
- mvccSnapshot = ectx.mvccSnapshot();
}
/** {@inheritDoc} */
@@ -241,7 +236,7 @@
if (part == null)
break;
- cur = part.dataStore().cursor(cctx.cacheId(), mvccSnapshot);
+ cur = part.dataStore().cursor(cctx.cacheId());
}
if (cur.next()) {
diff --git a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/CacheIndexImpl.java b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/CacheIndexImpl.java
index 4502ae3..079755a 100644
--- a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/CacheIndexImpl.java
+++ b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/CacheIndexImpl.java
@@ -202,7 +202,7 @@
try {
for (int i = 0; i < iidx.segmentsCount(); ++i)
- cnt += iidx.count(i, new IndexQueryContext(filter, rowFilter, ectx.mvccSnapshot()));
+ cnt += iidx.count(i, new IndexQueryContext(filter, rowFilter));
}
catch (IgniteCheckedException e) {
throw new IgniteException("Unable to count index records.", e);
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/IndexQueryContext.java b/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/IndexQueryContext.java
index 234fbc2..0c1bb7c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/IndexQueryContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/IndexQueryContext.java
@@ -18,7 +18,6 @@
package org.apache.ignite.internal.cache.query.index.sorted.inline;
import org.apache.ignite.internal.cache.query.index.sorted.IndexRow;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree;
import org.apache.ignite.spi.indexing.IndexingQueryFilter;
@@ -34,35 +33,22 @@
private final BPlusTree.TreeRowFactory<IndexRow, IndexRow> rowFactory;
/** */
- private final MvccSnapshot mvccSnapshot;
-
- /** */
public IndexQueryContext(
IndexingQueryFilter cacheFilter,
- BPlusTree.TreeRowClosure<IndexRow, IndexRow> rowFilter,
- MvccSnapshot mvccSnapshot
+ BPlusTree.TreeRowClosure<IndexRow, IndexRow> rowFilter
) {
- this(cacheFilter, rowFilter, null, mvccSnapshot);
+ this(cacheFilter, rowFilter, null);
}
/** */
public IndexQueryContext(
IndexingQueryFilter cacheFilter,
BPlusTree.TreeRowClosure<IndexRow, IndexRow> rowFilter,
- BPlusTree.TreeRowFactory<IndexRow, IndexRow> rowFactory,
- MvccSnapshot mvccSnapshot
+ BPlusTree.TreeRowFactory<IndexRow, IndexRow> rowFactory
) {
this.cacheFilter = cacheFilter;
this.rowFilter = rowFilter;
this.rowFactory = rowFactory;
- this.mvccSnapshot = mvccSnapshot;
- }
-
- /**
- * @return Mvcc snapshot.
- */
- public MvccSnapshot mvccSnapshot() {
- return mvccSnapshot;
}
/**
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/management/cdc/CdcCacheDataResendTask.java b/modules/core/src/main/java/org/apache/ignite/internal/management/cdc/CdcCacheDataResendTask.java
index 9a7bae4..9e20649 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/management/cdc/CdcCacheDataResendTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/management/cdc/CdcCacheDataResendTask.java
@@ -179,7 +179,7 @@
GridCacheContext<?, ?> cctx = cache.context();
GridIterator<CacheDataRow> locRows = cctx.offheap()
- .cacheIterator(cctx.cacheId(), true, false, AffinityTopologyVersion.NONE, null, null);
+ .cacheIterator(cctx.cacheId(), true, false, AffinityTopologyVersion.NONE, null);
long cnt = 0;
Set<Integer> parts = new TreeSet<>();
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 f3ee723..bde2145 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
@@ -110,7 +110,6 @@
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareRequest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareResponse;
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearUnlockRequest;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshotWithoutTxs;
import org.apache.ignite.internal.processors.cache.persistence.snapshot.IncrementalSnapshotAwareMessage;
import org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotFilesFailureMessage;
import org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotFilesRequestMessage;
@@ -316,7 +315,6 @@
factory.register((short)133, ClusterMetricsUpdateMessage::new);
factory.register((short)134, ContinuousRoutineStartResultMessage::new);
factory.register((short)135, LatchAckMessage::new);
- factory.register((short)150, MvccSnapshotWithoutTxs::new);
factory.register((short)157, PartitionUpdateCountersMessage::new);
factory.register((short)158, GridDhtPartitionSupplyMessageV2::new);
factory.register((short)162, GenerateEncryptionKeyRequest::new);
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index c3ab16e..ba44189 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -732,7 +732,7 @@
IgniteCacheOffheapManager offheapMgr = ctx.isNear() ? ctx.near().dht().context().offheap() : ctx.offheap();
- its.add(offheapMgr.cacheEntriesIterator(ctx, modes.primary, modes.backup, topVer, ctx.keepBinary(), null, null));
+ its.add(offheapMgr.cacheEntriesIterator(ctx, modes.primary, modes.backup, topVer, ctx.keepBinary(), null));
}
}
else if (modes.heap) {
@@ -2598,7 +2598,7 @@
do {
Iterator<CacheDataRow> it = ctx.offheap().cacheIterator(ctx.cacheId(),
- true, true, null, null, null);
+ true, true, null, null);
while (it.hasNext() && keys.size() < REMOVE_ALL_KEYS_BATCH)
keys.add((K)it.next().key());
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
index 9c57ab8..195b9cb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
@@ -26,7 +26,6 @@
import org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockCancelledException;
import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicAbstractUpdateFuture;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
-import org.apache.ignite.internal.processors.cache.mvcc.txlog.TxState;
import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
@@ -618,8 +617,7 @@
GridDrType drType,
boolean fromStore,
boolean primary) throws IgniteCheckedException, GridCacheEntryRemovedException {
- return initialValue(val, ver, TxState.NA, TxState.NA,
- ttl, expireTime, preload, topVer, drType, fromStore, primary);
+ return initialValue(val, ver, ttl, expireTime, preload, topVer, drType, fromStore, primary, null);
}
/**
@@ -627,41 +625,6 @@
*
* @param val New value.
* @param ver Version to use.
- * @param mvccTxState Tx state hint for mvcc version.
- * @param newMvccTxState Tx state hint for new mvcc version.
- * @param ttl Time to live.
- * @param expireTime Expiration time.
- * @param preload Flag indicating whether entry is being preloaded.
- * @param topVer Topology version.
- * @param drType DR type.
- * @param fromStore {@code True} if value was loaded from store.
- * @param primary {@code True} if current node is primary for partition.
- * @return {@code True} if initial value was set.
- * @throws IgniteCheckedException In case of error.
- * @throws GridCacheEntryRemovedException If entry was removed.
- */
- default boolean initialValue(CacheObject val,
- GridCacheVersion ver,
- byte mvccTxState,
- byte newMvccTxState,
- long ttl,
- long expireTime,
- boolean preload,
- AffinityTopologyVersion topVer,
- GridDrType drType,
- boolean fromStore,
- boolean primary) throws IgniteCheckedException, GridCacheEntryRemovedException {
- return initialValue(val, ver, TxState.NA, TxState.NA,
- ttl, expireTime, preload, topVer, drType, fromStore, primary, null);
- }
-
- /**
- * Sets new value if current version is <tt>0</tt>
- *
- * @param val New value.
- * @param ver Version to use.
- * @param mvccTxState Tx state hint for mvcc version.
- * @param newMvccTxState Tx state hint for new mvcc version.
* @param ttl Time to live.
* @param expireTime Expiration time.
* @param preload Flag indicating whether entry is being preloaded.
@@ -676,8 +639,6 @@
*/
public boolean initialValue(CacheObject val,
GridCacheVersion ver,
- byte mvccTxState,
- byte newMvccTxState,
long ttl,
long expireTime,
boolean preload,
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 14defe5..fea3e4c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -2497,8 +2497,6 @@
@Override public boolean initialValue(
CacheObject val,
GridCacheVersion ver,
- byte mvccTxState,
- byte newMvccTxState,
long ttl,
long expireTime,
boolean preload,
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java
index 89f7e70..e10c6ed 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java
@@ -25,7 +25,6 @@
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.IgniteDhtDemandedPartitionsMap;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
import org.apache.ignite.internal.processors.cache.persistence.DataRowCacheAware;
import org.apache.ignite.internal.processors.cache.persistence.RootPage;
@@ -226,7 +225,6 @@
* @param primary Primary entries flag.
* @param backup Backup entries flag.
* @param topVer Topology version.
- * @param mvccSnapshot MVCC snapshot.
* @param dataPageScanEnabled Flag to enable data page scan.
* @return Rows iterator.
* @throws IgniteCheckedException If failed.
@@ -235,20 +233,18 @@
boolean primary,
boolean backup,
AffinityTopologyVersion topVer,
- @Nullable MvccSnapshot mvccSnapshot,
Boolean dataPageScanEnabled
) throws IgniteCheckedException;
/**
* @param cacheId Cache ID.
* @param part Partition.
- * @param mvccSnapshot MVCC snapshot.
* @param dataPageScanEnabled Flag to enable data page scan.
* @return Partition data iterator.
* @throws IgniteCheckedException If failed.
*/
public GridIterator<CacheDataRow> cachePartitionIterator(int cacheId, final int part,
- @Nullable MvccSnapshot mvccSnapshot, Boolean dataPageScanEnabled) throws IgniteCheckedException;
+ Boolean dataPageScanEnabled) throws IgniteCheckedException;
/**
* @param part Partition number.
@@ -271,7 +267,6 @@
* @return Partition data iterator.
* @throws IgniteCheckedException If failed.
*/
- // TODO: MVCC>
public IgniteRebalanceIterator rebalanceIterator(IgniteDhtDemandedPartitionsMap parts, AffinityTopologyVersion topVer)
throws IgniteCheckedException;
@@ -281,7 +276,6 @@
* @param backup {@code True} if need to return backup entries.
* @param topVer Topology version.
* @param keepBinary Keep binary flag.
- * @param mvccSnapshot MVCC snapshot.
* @param dataPageScanEnabled Flag to enable data page scan.
* @return Entries iterator.
* @throws IgniteCheckedException If failed.
@@ -292,7 +286,6 @@
final boolean backup,
final AffinityTopologyVersion topVer,
final boolean keepBinary,
- @Nullable final MvccSnapshot mvccSnapshot,
Boolean dataPageScanEnabled
) throws IgniteCheckedException;
@@ -302,7 +295,6 @@
* @return Iterator.
* @throws IgniteCheckedException If failed.
*/
- // TODO: MVCC>
public GridCloseableIterator<KeyCacheObject> cacheKeysIterator(int cacheId, final int part)
throws IgniteCheckedException;
@@ -313,7 +305,6 @@
* @param topVer Topology version.
* @return Entries count.
*/
- // TODO: MVCC>
public long cacheEntriesCount(int cacheId, boolean primary, boolean backup, AffinityTopologyVersion topVer);
/**
@@ -622,13 +613,6 @@
public GridCursor<? extends CacheDataRow> cursor(Object x) throws IgniteCheckedException;
/**
- * @param mvccSnapshot MVCC snapshot.
- * @return Data cursor.
- * @throws IgniteCheckedException If failed.
- */
- public GridCursor<? extends CacheDataRow> cursor(MvccSnapshot mvccSnapshot) throws IgniteCheckedException;
-
- /**
* @param cacheId Cache ID.
* @return Data cursor.
* @throws IgniteCheckedException If failed.
@@ -637,15 +621,6 @@
/**
* @param cacheId Cache ID.
- * @param mvccSnapshot Mvcc snapshot.
- * @return Data cursor.
- * @throws IgniteCheckedException If failed.
- */
- public GridCursor<? extends CacheDataRow> cursor(int cacheId, MvccSnapshot mvccSnapshot)
- throws IgniteCheckedException;
-
- /**
- * @param cacheId Cache ID.
* @param lower Lower bound.
* @param upper Upper bound.
* @return Data cursor.
@@ -666,18 +641,6 @@
KeyCacheObject upper, Object x) throws IgniteCheckedException;
/**
- * @param cacheId Cache ID.
- * @param lower Lower bound.
- * @param upper Upper bound.
- * @param x Implementation specific argument, {@code null} always means that we need to return full detached data row.
- * @param snapshot Mvcc snapshot.
- * @return Data cursor.
- * @throws IgniteCheckedException If failed.
- */
- public GridCursor<? extends CacheDataRow> cursor(int cacheId, KeyCacheObject lower,
- KeyCacheObject upper, Object x, MvccSnapshot snapshot) throws IgniteCheckedException;
-
- /**
* Destroys the tree associated with the store.
*
* @throws IgniteCheckedException If failed.
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
index 9ba25c7..c1f23eb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
@@ -51,7 +51,6 @@
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.IgniteRebalanceIteratorImpl;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtInvalidPartitionException;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
import org.apache.ignite.internal.processors.cache.persistence.CacheDataRowAdapter;
import org.apache.ignite.internal.processors.cache.persistence.CacheSearchRow;
@@ -521,11 +520,10 @@
boolean backup,
AffinityTopologyVersion topVer,
boolean keepBinary,
- @Nullable MvccSnapshot mvccSnapshot,
Boolean dataPageScanEnabled
) {
Iterator<CacheDataRow> it = cacheIterator(cctx.cacheId(), primary, backup,
- topVer, mvccSnapshot, dataPageScanEnabled);
+ topVer, dataPageScanEnabled);
return new GridCloseableIteratorAdapter<Cache.Entry<K, V>>() {
/** */
@@ -609,21 +607,20 @@
boolean primary,
boolean backups,
AffinityTopologyVersion topVer,
- @Nullable MvccSnapshot mvccSnapshot,
Boolean dataPageScanEnabled
) {
- return iterator(cacheId, cacheData(primary, backups, topVer), mvccSnapshot, dataPageScanEnabled);
+ return iterator(cacheId, cacheData(primary, backups, topVer), dataPageScanEnabled);
}
/** {@inheritDoc} */
@Override public GridIterator<CacheDataRow> cachePartitionIterator(int cacheId, int part,
- @Nullable MvccSnapshot mvccSnapshot, Boolean dataPageScanEnabled) {
+ Boolean dataPageScanEnabled) {
CacheDataStore data = dataStore(part, true);
if (data == null)
return new GridEmptyCloseableIterator<>();
- return iterator(cacheId, singletonIterator(data), mvccSnapshot, dataPageScanEnabled);
+ return iterator(cacheId, singletonIterator(data), dataPageScanEnabled);
}
/** {@inheritDoc} */
@@ -633,20 +630,18 @@
if (data == null)
return new GridEmptyCloseableIterator<>();
- return iterator(CU.UNDEFINED_CACHE_ID, singletonIterator(data), null, null);
+ return iterator(CU.UNDEFINED_CACHE_ID, singletonIterator(data), null);
}
/**
*
* @param cacheId Cache ID.
* @param dataIt Data store iterator.
- * @param mvccSnapshot Mvcc snapshot.
* @param dataPageScanEnabled Flag to enable data page scan.
* @return Rows iterator
*/
private GridCloseableIterator<CacheDataRow> iterator(int cacheId,
Iterator<CacheDataStore> dataIt,
- MvccSnapshot mvccSnapshot,
Boolean dataPageScanEnabled
) {
return new GridCloseableIteratorAdapter<CacheDataRow>() {
@@ -684,12 +679,7 @@
CacheDataTree.setDataPageScanEnabled(false);
try {
- if (mvccSnapshot == null)
- cur = cacheId == CU.UNDEFINED_CACHE_ID ? ds.cursor() : ds.cursor(cacheId);
- else {
- cur = cacheId == CU.UNDEFINED_CACHE_ID ?
- ds.cursor(mvccSnapshot) : ds.cursor(cacheId, mvccSnapshot);
- }
+ cur = cacheId == CU.UNDEFINED_CACHE_ID ? ds.cursor() : ds.cursor(cacheId);
}
finally {
CacheDataTree.setDataPageScanEnabled(false);
@@ -1810,24 +1800,11 @@
}
/** {@inheritDoc} */
- @Override public GridCursor<? extends CacheDataRow> cursor(MvccSnapshot mvccSnapshot)
- throws IgniteCheckedException {
-
- return dataTree.find(null, null);
- }
-
- /** {@inheritDoc} */
@Override public GridCursor<? extends CacheDataRow> cursor(int cacheId) throws IgniteCheckedException {
return cursor(cacheId, null, null);
}
/** {@inheritDoc} */
- @Override public GridCursor<? extends CacheDataRow> cursor(int cacheId,
- MvccSnapshot mvccSnapshot) throws IgniteCheckedException {
- return cursor(cacheId, null, null, null, mvccSnapshot);
- }
-
- /** {@inheritDoc} */
@Override public GridCursor<? extends CacheDataRow> cursor(int cacheId, KeyCacheObject lower,
KeyCacheObject upper) throws IgniteCheckedException {
return cursor(cacheId, lower, upper, null);
@@ -1836,12 +1813,6 @@
/** {@inheritDoc} */
@Override public GridCursor<? extends CacheDataRow> cursor(int cacheId, KeyCacheObject lower,
KeyCacheObject upper, Object x) throws IgniteCheckedException {
- return cursor(cacheId, lower, upper, null, null);
- }
-
- /** {@inheritDoc} */
- @Override public GridCursor<? extends CacheDataRow> cursor(int cacheId, KeyCacheObject lower,
- KeyCacheObject upper, Object x, MvccSnapshot snapshot) throws IgniteCheckedException {
SearchRow lowerRow;
SearchRow upperRow;
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index 2bd37ec..19bbb68 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -74,7 +74,6 @@
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearGetResponse;
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearSingleGetRequest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearSingleGetResponse;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.processors.platform.cache.PlatformCacheEntryFilter;
@@ -677,8 +676,7 @@
/*keep cache objects*/false,
opCtx != null && opCtx.recovery(),
needVer,
- null,
- null); // TODO IGNITE-7371
+ null);
}
/**
@@ -692,7 +690,6 @@
* @param keepCacheObjects Keep cache objects.
* @param needVer If {@code true} returns values as tuples containing value and version.
* @param txLbl Transaction label.
- * @param mvccSnapshot MVCC snapshot.
* @return Future.
*/
private <K1, V1> IgniteInternalFuture<Map<K1, V1>> getAllAsync0(
@@ -706,14 +703,11 @@
final boolean keepCacheObjects,
final boolean recovery,
final boolean needVer,
- @Nullable String txLbl,
- MvccSnapshot mvccSnapshot
+ @Nullable String txLbl
) {
if (F.isEmpty(keys))
return new GridFinishedFuture<>(Collections.emptyMap());
- assert mvccSnapshot == null;
-
Map<KeyCacheObject, EntryGetResult> misses = null;
Set<GridCacheEntryEx> newLocEntries = null;
@@ -1065,7 +1059,6 @@
* @param expiry Expiry policy.
* @param skipVals Skip values flag.
* @param txLbl Transaction label.
- * @param mvccSnapshot MVCC snapshot.
* @return Get future.
*/
IgniteInternalFuture<Map<KeyCacheObject, EntryGetResult>> getDhtAllAsync(
@@ -1076,8 +1069,7 @@
@Nullable IgniteCacheExpiryPolicy expiry,
boolean skipVals,
boolean recovery,
- @Nullable String txLbl,
- MvccSnapshot mvccSnapshot
+ @Nullable String txLbl
) {
return getAllAsync0(keys,
readerArgs,
@@ -1089,8 +1081,7 @@
/*keep cache objects*/true,
recovery,
/*need version*/true,
- txLbl,
- mvccSnapshot);
+ txLbl);
}
/**
@@ -1104,7 +1095,6 @@
* @param expiry Expiry policy.
* @param skipVals Skip values flag.
* @param txLbl Transaction label.
- * @param mvccSnapshot MVCC snapshot.
* @return DHT future.
*/
public GridDhtFuture<Collection<GridCacheEntryInfo>> getDhtAsync(UUID reader,
@@ -1117,8 +1107,7 @@
@Nullable IgniteCacheExpiryPolicy expiry,
boolean skipVals,
boolean recovery,
- @Nullable String txLbl,
- MvccSnapshot mvccSnapshot
+ @Nullable String txLbl
) {
GridDhtGetFuture<K, V> fut = new GridDhtGetFuture<>(ctx,
msgId,
@@ -1131,8 +1120,7 @@
skipVals,
recovery,
addReaders,
- txLbl,
- mvccSnapshot);
+ txLbl);
fut.init();
@@ -1150,7 +1138,6 @@
* @param expiry Expiry.
* @param skipVals Skip vals flag.
* @param txLbl Transaction label.
- * @param mvccSnapshot Mvcc snapshot.
* @return Future for the operation.
*/
GridDhtGetSingleFuture getDhtSingleAsync(
@@ -1164,8 +1151,7 @@
@Nullable IgniteCacheExpiryPolicy expiry,
boolean skipVals,
boolean recovery,
- String txLbl,
- MvccSnapshot mvccSnapshot
+ String txLbl
) {
GridDhtGetSingleFuture fut = new GridDhtGetSingleFuture<>(
ctx,
@@ -1179,8 +1165,7 @@
expiry,
skipVals,
recovery,
- txLbl,
- mvccSnapshot);
+ txLbl);
fut.init();
@@ -1208,8 +1193,7 @@
expiryPlc,
req.skipValues(),
req.recovery(),
- req.txLabel(),
- req.mvccSnapshot());
+ req.txLabel());
fut.listen(new CI1<IgniteInternalFuture<GridCacheEntryInfo>>() {
@Override public void apply(IgniteInternalFuture<GridCacheEntryInfo> f) {
@@ -1313,8 +1297,7 @@
expiryPlc,
req.skipValues(),
req.recovery(),
- req.txLabel(),
- req.mvccSnapshot());
+ req.txLabel());
fut.listen(new CI1<IgniteInternalFuture<Collection<GridCacheEntryInfo>>>() {
@Override public void apply(IgniteInternalFuture<Collection<GridCacheEntryInfo>> f) {
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
index 97e025e..5a75853 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
@@ -39,7 +39,6 @@
import org.apache.ignite.internal.processors.cache.ReaderArguments;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtInvalidPartitionException;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.util.future.GridCompoundFuture;
import org.apache.ignite.internal.util.future.GridCompoundIdentityFuture;
@@ -120,9 +119,6 @@
/** Transaction label. */
private final String txLbl;
- /** */
- private final MvccSnapshot mvccSnapshot;
-
/**
* @param cctx Context.
* @param msgId Message ID.
@@ -134,7 +130,6 @@
* @param expiryPlc Expiry policy.
* @param skipVals Skip values flag.
* @param txLbl Transaction label.
- * @param mvccSnapshot MVCC snapshot.
*/
public GridDhtGetFuture(
GridCacheContext<K, V> cctx,
@@ -148,8 +143,7 @@
boolean skipVals,
boolean recovery,
boolean addReaders,
- @Nullable String txLbl,
- MvccSnapshot mvccSnapshot
+ @Nullable String txLbl
) {
super(CU.<GridCacheEntryInfo>collectionsReducer(keys.size()));
@@ -168,7 +162,6 @@
this.recovery = recovery;
this.addReaders = addReaders;
this.txLbl = txLbl;
- this.mvccSnapshot = mvccSnapshot;
futId = IgniteUuid.randomUuid();
@@ -441,8 +434,7 @@
expiryPlc,
skipVals,
recovery,
- txLbl,
- mvccSnapshot);
+ txLbl);
}
else {
final ReaderArguments args = readerArgs;
@@ -465,8 +457,7 @@
expiryPlc,
skipVals,
recovery,
- txLbl,
- mvccSnapshot);
+ txLbl);
}
}
);
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetSingleFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetSingleFuture.java
index 2806280..f58ac9d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetSingleFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetSingleFuture.java
@@ -37,7 +37,6 @@
import org.apache.ignite.internal.processors.cache.ReaderArguments;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtInvalidPartitionException;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.util.future.GridFutureAdapter;
import org.apache.ignite.internal.util.typedef.F;
@@ -109,9 +108,6 @@
/** Transaction label. */
private final String txLbl;
- /** */
- private final MvccSnapshot mvccSnapshot;
-
/**
* @param cctx Context.
* @param msgId Message ID.
@@ -124,7 +120,6 @@
* @param expiryPlc Expiry policy.
* @param skipVals Skip values flag.
* @param txLbl Transaction label.
- * @param mvccSnapshot Mvcc snapshot.
*/
public GridDhtGetSingleFuture(
GridCacheContext<K, V> cctx,
@@ -138,8 +133,7 @@
@Nullable IgniteCacheExpiryPolicy expiryPlc,
boolean skipVals,
boolean recovery,
- @Nullable String txLbl,
- @Nullable MvccSnapshot mvccSnapshot
+ @Nullable String txLbl
) {
assert reader != null;
assert key != null;
@@ -156,7 +150,6 @@
this.skipVals = skipVals;
this.recovery = recovery;
this.txLbl = txLbl;
- this.mvccSnapshot = mvccSnapshot;
futId = IgniteUuid.randomUuid();
@@ -385,8 +378,7 @@
expiryPlc,
skipVals,
recovery,
- txLbl,
- mvccSnapshot);
+ txLbl);
}
else {
final ReaderArguments args = readerArgs;
@@ -411,8 +403,7 @@
expiryPlc,
skipVals,
recovery,
- null,
- mvccSnapshot);
+ null);
fut0.listen(createGetFutureListener());
}
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
index 35183fc..3f2e813 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
@@ -55,7 +55,6 @@
import org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedLockFuture;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtInvalidPartitionException;
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheAdapter;
-import org.apache.ignite.internal.processors.cache.mvcc.txlog.TxState;
import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
@@ -1349,8 +1348,6 @@
try {
if (entry.initialValue(info.value(),
info.version(),
- TxState.NA,
- TxState.NA,
info.ttl(),
info.expireTime(),
true,
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
index 405a563..143c3aa 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
@@ -380,7 +380,6 @@
tx.activeCachesDeploymentEnabled(),
false,
false,
- null,
cctx.tm().txHandler().filterUpdateCountersForBackupNode(tx, n));
try {
@@ -479,7 +478,6 @@
null,
false,
false,
- null,
commit ? null : cctx.tm().txHandler().filterUpdateCountersForBackupNode(tx, n));
req.writeVersion(tx.writeVersion() != null ? tx.writeVersion() : tx.xidVersion());
@@ -556,7 +554,6 @@
tx.activeCachesDeploymentEnabled(),
false,
false,
- null,
null);
req.writeVersion(tx.writeVersion());
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
index 4ec3c4d..3b19de5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
@@ -25,7 +25,6 @@
import org.apache.ignite.internal.GridDirectCollection;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxFinishRequest;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.util.GridLongList;
import org.apache.ignite.internal.util.tostring.GridToStringInclude;
@@ -68,9 +67,6 @@
private GridCacheVersion writeVer;
/** */
- private MvccSnapshot mvccSnapshot;
-
- /** */
@GridDirectCollection(PartitionUpdateCountersMessage.class)
private Collection<PartitionUpdateCountersMessage> updCntrs;
@@ -105,7 +101,6 @@
* @param addDepInfo Deployment info flag.
* @param retVal Need return value
* @param waitRemoteTxs Wait remote transactions flag
- * @param mvccSnapshot Mvcc snapshot.
* @param updCntrs Update counters for mvcc Tx.
*/
public GridDhtTxFinishRequest(
@@ -132,7 +127,6 @@
boolean addDepInfo,
boolean retVal,
boolean waitRemoteTxs,
- MvccSnapshot mvccSnapshot,
Collection<PartitionUpdateCountersMessage> updCntrs
) {
super(
@@ -161,7 +155,6 @@
this.nearNodeId = nearNodeId;
this.isolation = isolation;
this.miniId = miniId;
- this.mvccSnapshot = mvccSnapshot;
this.updCntrs = updCntrs;
needReturnValue(retVal);
@@ -194,7 +187,6 @@
* @param addDepInfo Deployment info flag.
* @param retVal Need return value
* @param waitRemoteTxs Wait remote transactions flag
- * @param mvccSnapshot Mvcc snapshot.
* @param updCntrs Update counters for mvcc Tx.
*/
public GridDhtTxFinishRequest(
@@ -222,7 +214,6 @@
Collection<Long> updateIdxs,
boolean retVal,
boolean waitRemoteTxs,
- MvccSnapshot mvccSnapshot,
Collection<PartitionUpdateCountersMessage> updCntrs
) {
this(nearNodeId,
@@ -248,18 +239,10 @@
addDepInfo,
retVal,
waitRemoteTxs,
- mvccSnapshot,
updCntrs);
}
/**
- * @return Counter.
- */
- public MvccSnapshot mvccSnapshot() {
- return mvccSnapshot;
- }
-
- /**
* @return Partition update counters.
*/
public GridLongList partUpdateCounters() {
@@ -392,36 +375,30 @@
writer.incrementState();
case 23:
- if (!writer.writeMessage("mvccSnapshot", mvccSnapshot))
- return false;
-
- writer.incrementState();
-
- case 24:
if (!writer.writeUuid("nearNodeId", nearNodeId))
return false;
writer.incrementState();
- case 25:
+ case 24:
if (!writer.writeMessage("partUpdateCnt", partUpdateCnt))
return false;
writer.incrementState();
- case 26:
+ case 25:
if (!writer.writeCollection("pendingVers", pendingVers, MessageCollectionItemType.MSG))
return false;
writer.incrementState();
- case 27:
+ case 26:
if (!writer.writeCollection("updCntrs", updCntrs, MessageCollectionItemType.MSG))
return false;
writer.incrementState();
- case 28:
+ case 27:
if (!writer.writeMessage("writeVer", writeVer))
return false;
@@ -464,14 +441,6 @@
reader.incrementState();
case 23:
- mvccSnapshot = reader.readMessage("mvccSnapshot");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 24:
nearNodeId = reader.readUuid("nearNodeId");
if (!reader.isLastRead())
@@ -479,7 +448,7 @@
reader.incrementState();
- case 25:
+ case 24:
partUpdateCnt = reader.readMessage("partUpdateCnt");
if (!reader.isLastRead())
@@ -487,7 +456,7 @@
reader.incrementState();
- case 26:
+ case 25:
pendingVers = reader.readCollection("pendingVers", MessageCollectionItemType.MSG);
if (!reader.isLastRead())
@@ -495,7 +464,7 @@
reader.incrementState();
- case 27:
+ case 26:
updCntrs = reader.readCollection("updCntrs", MessageCollectionItemType.MSG);
if (!reader.isLastRead())
@@ -503,7 +472,7 @@
reader.incrementState();
- case 28:
+ case 27:
writeVer = reader.readMessage("writeVer");
if (!reader.isLastRead())
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
index 280a860..0840711 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
@@ -67,7 +67,6 @@
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheAdapter;
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareRequest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareResponse;
-import org.apache.ignite.internal.processors.cache.mvcc.txlog.TxState;
import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
@@ -1432,7 +1431,6 @@
tx.activeCachesDeploymentEnabled(),
tx.storeWriteThrough(),
retVal,
- null,
cctx.tm().txHandler().filterUpdateCountersForBackupNode(tx, n));
req.queryUpdate(dhtMapping.queryUpdate());
@@ -1546,7 +1544,6 @@
tx.activeCachesDeploymentEnabled(),
tx.storeWriteThrough(),
retVal,
- null,
null);
for (IgniteTxEntry entry : nearMapping.entries()) {
@@ -1974,8 +1971,6 @@
try {
if (entry.initialValue(info.value(),
info.version(),
- TxState.NA,
- TxState.NA,
info.ttl(),
info.expireTime(),
true,
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
index db3a4ec..649392f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
@@ -34,7 +34,6 @@
import org.apache.ignite.internal.processors.cache.GridCacheContext;
import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareRequest;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
@@ -105,9 +104,6 @@
@GridDirectTransient
private List<IgniteTxKey> nearWritesCacheMissed;
- /** */
- private MvccSnapshot mvccSnapshot;
-
/** {@code True} if remote tx should skip adding itself to completed versions map on finish. */
private boolean skipCompletedVers;
@@ -136,7 +132,6 @@
* @param addDepInfo Deployment info flag.
* @param storeWriteThrough Cache store write through flag.
* @param retVal Need return value flag
- * @param mvccSnapshot Mvcc snapshot.
* @param updCntrs Update counters for mvcc Tx.
*/
public GridDhtTxPrepareRequest(
@@ -155,7 +150,6 @@
boolean addDepInfo,
boolean storeWriteThrough,
boolean retVal,
- MvccSnapshot mvccSnapshot,
Collection<PartitionUpdateCountersMessage> updCntrs) {
super(tx,
timeout,
@@ -176,7 +170,6 @@
this.miniId = miniId;
this.nearXidVer = nearXidVer;
this.taskNameHash = taskNameHash;
- this.mvccSnapshot = mvccSnapshot;
this.updCntrs = updCntrs;
storeWriteThrough(storeWriteThrough);
@@ -192,13 +185,6 @@
}
/**
- * @return Mvcc info.
- */
- public MvccSnapshot mvccSnapshot() {
- return mvccSnapshot;
- }
-
- /**
* @return Update counters list.
*/
public Collection<PartitionUpdateCountersMessage> updateCounters() {
@@ -443,72 +429,66 @@
writer.incrementState();
case 24:
- if (!writer.writeMessage("mvccSnapshot", mvccSnapshot))
- return false;
-
- writer.incrementState();
-
- case 25:
if (!writer.writeUuid("nearNodeId", nearNodeId))
return false;
writer.incrementState();
- case 26:
+ case 25:
if (!writer.writeCollection("nearWrites", nearWrites, MessageCollectionItemType.MSG))
return false;
writer.incrementState();
- case 27:
+ case 26:
if (!writer.writeMessage("nearXidVer", nearXidVer))
return false;
writer.incrementState();
- case 28:
+ case 27:
if (!writer.writeCollection("ownedKeys", ownedKeys, MessageCollectionItemType.MSG))
return false;
writer.incrementState();
- case 29:
+ case 28:
if (!writer.writeCollection("ownedVals", ownedVals, MessageCollectionItemType.MSG))
return false;
writer.incrementState();
- case 30:
+ case 29:
if (!writer.writeBitSet("preloadKeys", preloadKeys))
return false;
writer.incrementState();
- case 31:
+ case 30:
if (!writer.writeBoolean("skipCompletedVers", skipCompletedVers))
return false;
writer.incrementState();
- case 32:
+ case 31:
if (!writer.writeInt("taskNameHash", taskNameHash))
return false;
writer.incrementState();
- case 33:
+ case 32:
if (!writer.writeAffinityTopologyVersion("topVer", topVer))
return false;
writer.incrementState();
- case 34:
+ case 33:
if (!writer.writeString("txLbl", txLbl))
return false;
writer.incrementState();
- case 35:
+ case 34:
if (!writer.writeCollection("updCntrs", updCntrs, MessageCollectionItemType.MSG))
return false;
@@ -555,14 +535,6 @@
reader.incrementState();
case 24:
- mvccSnapshot = reader.readMessage("mvccSnapshot");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 25:
nearNodeId = reader.readUuid("nearNodeId");
if (!reader.isLastRead())
@@ -570,7 +542,7 @@
reader.incrementState();
- case 26:
+ case 25:
nearWrites = reader.readCollection("nearWrites", MessageCollectionItemType.MSG);
if (!reader.isLastRead())
@@ -578,7 +550,7 @@
reader.incrementState();
- case 27:
+ case 26:
nearXidVer = reader.readMessage("nearXidVer");
if (!reader.isLastRead())
@@ -586,7 +558,7 @@
reader.incrementState();
- case 28:
+ case 27:
ownedKeys = reader.readCollection("ownedKeys", MessageCollectionItemType.MSG);
if (!reader.isLastRead())
@@ -594,7 +566,7 @@
reader.incrementState();
- case 29:
+ case 28:
ownedVals = reader.readCollection("ownedVals", MessageCollectionItemType.MSG);
if (!reader.isLastRead())
@@ -602,7 +574,7 @@
reader.incrementState();
- case 30:
+ case 29:
preloadKeys = reader.readBitSet("preloadKeys");
if (!reader.isLastRead())
@@ -610,7 +582,7 @@
reader.incrementState();
- case 31:
+ case 30:
skipCompletedVers = reader.readBoolean("skipCompletedVers");
if (!reader.isLastRead())
@@ -618,7 +590,7 @@
reader.incrementState();
- case 32:
+ case 31:
taskNameHash = reader.readInt("taskNameHash");
if (!reader.isLastRead())
@@ -626,7 +598,7 @@
reader.incrementState();
- case 33:
+ case 32:
topVer = reader.readAffinityTopologyVersion("topVer");
if (!reader.isLastRead())
@@ -634,7 +606,7 @@
reader.incrementState();
- case 34:
+ case 33:
txLbl = reader.readString("txLbl");
if (!reader.isLastRead())
@@ -642,7 +614,7 @@
reader.incrementState();
- case 35:
+ case 34:
updCntrs = reader.readCollection("updCntrs", MessageCollectionItemType.MSG);
if (!reader.isLastRead())
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
index a890cd7..18a01af 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
@@ -42,7 +42,6 @@
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtInvalidPartitionException;
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearGetRequest;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.util.GridLeanMap;
@@ -61,9 +60,6 @@
/** Transaction label. */
private final String txLbl;
- /** */
- private final MvccSnapshot mvccSnapshot;
-
/** Explicit predefined single mapping (backup or primary). */
private final ClusterNode affNode;
@@ -81,7 +77,6 @@
* @param needVer If {@code true} returns values as tuples containing value and version.
* @param keepCacheObjects Keep cache objects flag.
* @param txLbl Transaction label.
- * @param mvccSnapshot Mvcc snapshot.
*/
public GridPartitionedGetFuture(
GridCacheContext<K, V> cctx,
@@ -96,7 +91,6 @@
boolean needVer,
boolean keepCacheObjects,
@Nullable String txLbl,
- @Nullable MvccSnapshot mvccSnapshot,
ClusterNode affNode
) {
super(
@@ -112,10 +106,6 @@
keepCacheObjects,
recovery
);
-
- assert mvccSnapshot == null;
-
- this.mvccSnapshot = mvccSnapshot;
this.txLbl = txLbl;
this.affNode = affNode;
@@ -123,13 +113,6 @@
}
/**
- * @return Mvcc snapshot if mvcc is enabled for cache.
- */
- @Nullable private MvccSnapshot mvccSnapshot() {
- return mvccSnapshot;
- }
-
- /**
* Initializes future.
*
* @param topVer Topology version.
@@ -261,9 +244,7 @@
expiryPlc,
skipVals,
recovery,
- txLbl,
- mvccSnapshot()
- );
+ txLbl);
Collection<Integer> invalidParts = fut0.invalidPartitions();
@@ -683,8 +664,7 @@
skipVals,
cctx.deploymentEnabled(),
recovery,
- txLbl,
- mvccSnapshot()
+ txLbl
);
}
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
index 853b175..12b5e37 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
@@ -53,7 +53,6 @@
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearGetResponse;
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearSingleGetRequest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearSingleGetResponse;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.util.lang.GridPlainRunnable;
@@ -140,9 +139,6 @@
@GridToStringInclude
private ClusterNode node;
- /** */
- protected final MvccSnapshot mvccSnapshot;
-
/** Deployment class loader id which will be used for deserialization of entries on a distributed task. */
@GridToStringExclude
protected final IgniteUuid deploymentLdrId;
@@ -186,11 +182,9 @@
boolean needVer,
boolean keepCacheObjects,
boolean recovery,
- String txLbl,
- @Nullable MvccSnapshot mvccSnapshot
+ String txLbl
) {
assert key != null;
- assert mvccSnapshot == null;
AffinityTopologyVersion lockedTopVer = cctx.shared().lockedTopologyVersion(null);
@@ -214,7 +208,6 @@
this.keepCacheObjects = keepCacheObjects;
this.recovery = recovery;
this.topVer = topVer;
- this.mvccSnapshot = mvccSnapshot;
deploymentLdrId = U.contextDeploymentClassLoaderId(cctx.kernalContext());
this.txLbl = txLbl;
@@ -300,8 +293,7 @@
expiryPlc,
skipVals,
recovery,
- txLbl,
- mvccSnapshot
+ txLbl
);
Collection<Integer> invalidParts = fut0.invalidPartitions();
@@ -365,8 +357,7 @@
needVer,
cctx.deploymentEnabled(),
recovery,
- txLbl,
- mvccSnapshot
+ txLbl
);
try {
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index cb5d3a8..4d07658 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -1411,7 +1411,6 @@
needVer,
false,
recovery,
- null,
null);
fut.init();
@@ -1643,7 +1642,6 @@
needVer,
false,
null,
- null,
null);
fut.init(topVer);
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
index f3b6e5d..db5a001 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
@@ -61,7 +61,6 @@
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal;
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearUnlockRequest;
import org.apache.ignite.internal.processors.cache.distributed.near.consistency.GridNearReadRepairCheckOnlyFuture;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalEx;
@@ -268,7 +267,6 @@
needVer,
/*keepCacheObjects*/false,
opCtx != null && opCtx.recovery(),
- null,
null);
fut.init();
@@ -354,7 +352,6 @@
skipVals,
needVer,
false,
- null,
null
);
@@ -387,7 +384,6 @@
boolean needVer,
boolean keepCacheObj,
boolean recovery,
- @Nullable MvccSnapshot mvccSnapshot,
@Nullable String txLbl
) {
GridPartitionedSingleGetFuture fut = new GridPartitionedSingleGetFuture(ctx,
@@ -402,8 +398,7 @@
needVer,
keepCacheObj,
recovery,
- txLbl,
- mvccSnapshot);
+ txLbl);
fut.init();
@@ -422,7 +417,6 @@
* @param needVer If {@code true} returns values as tuples containing value and version.
* @param keepCacheObj Keep cache objects flag.
* @param txLbl Transaction label.
- * @param mvccSnapshot Mvcc snapshot.
* @return Load future.
*/
public final IgniteInternalFuture<Map<K, V>> loadAsync(
@@ -437,11 +431,8 @@
boolean skipVals,
boolean needVer,
boolean keepCacheObj,
- @Nullable String txLbl,
- @Nullable MvccSnapshot mvccSnapshot
+ @Nullable String txLbl
) {
- assert mvccSnapshot == null;
-
if (keys == null || keys.isEmpty())
return new GridFinishedFuture<>(Collections.<K, V>emptyMap());
@@ -634,7 +625,6 @@
needVer,
keepCacheObj,
txLbl,
- mvccSnapshot,
null);
fut.init(topVer);
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
index 8cb91b5..1079d5b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
@@ -42,7 +42,6 @@
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtFuture;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionTopology;
-import org.apache.ignite.internal.processors.cache.mvcc.txlog.TxState;
import org.apache.ignite.internal.util.F0;
import org.apache.ignite.internal.util.GridLeanSet;
import org.apache.ignite.internal.util.future.GridCompoundFuture;
@@ -534,8 +533,6 @@
if (entry.initialValue(
info.value(),
info.version(),
- TxState.NA,
- TxState.NA,
info.ttl(),
info.expireTime(),
true,
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
index 3e1bb80..b57e2f6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
@@ -61,7 +61,6 @@
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtInvalidPartitionException;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionTopology;
-import org.apache.ignite.internal.processors.cache.mvcc.txlog.TxState;
import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
import org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointProgress;
import org.apache.ignite.internal.processors.timeout.GridTimeoutObject;
@@ -823,8 +822,6 @@
if (cached.initialValue(
row.value(),
row.version(),
- TxState.NA,
- TxState.NA,
TTL_ETERNAL,
row.expireTime(),
true,
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
index 9915f08..8f93131 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
@@ -243,9 +243,8 @@
expiryPlc,
skipVals,
recovery,
- null,
null
- ); // TODO IGNITE-7371
+ );
Collection<Integer> invalidParts = fut.invalidPartitions();
@@ -750,9 +749,8 @@
skipVals,
cctx.deploymentEnabled(),
recovery,
- null,
null
- ); // TODO IGNITE-7371
+ );
}
/** {@inheritDoc} */
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
index 1f2d4c0..b200bab 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
@@ -33,7 +33,6 @@
import org.apache.ignite.internal.processors.cache.GridCacheIdMessage;
import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
import org.apache.ignite.internal.processors.cache.KeyCacheObject;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersionable;
import org.apache.ignite.internal.util.tostring.GridToStringInclude;
@@ -107,9 +106,6 @@
/** Transaction label. */
private @Nullable String txLbl;
- /** */
- private MvccSnapshot mvccSnapshot;
-
/**
* Empty constructor required for {@link Externalizable}.
*/
@@ -132,7 +128,6 @@
* @param accessTtl New TTL to set after entry is accessed, -1 to leave unchanged.
* @param addDepInfo Deployment info.
* @param txLbl Transaction label.
- * @param mvccSnapshot Mvcc snapshot.
*/
public GridNearGetRequest(
int cacheId,
@@ -149,8 +144,7 @@
boolean skipVals,
boolean addDepInfo,
boolean recovery,
- @Nullable String txLbl,
- @Nullable MvccSnapshot mvccSnapshot
+ @Nullable String txLbl
) {
assert futId != null;
assert miniId != null;
@@ -179,7 +173,6 @@
this.accessTtl = accessTtl;
this.addDepInfo = addDepInfo;
this.txLbl = txLbl;
- this.mvccSnapshot = mvccSnapshot;
if (readThrough)
flags |= READ_THROUGH_FLAG_MASK;
@@ -195,13 +188,6 @@
}
/**
- * @return Mvcc version.
- */
- @Nullable public MvccSnapshot mvccSnapshot() {
- return mvccSnapshot;
- }
-
- /**
* @return Future ID.
*/
public IgniteUuid futureId() {
@@ -399,36 +385,30 @@
writer.incrementState();
case 10:
- if (!writer.writeMessage("mvccSnapshot", mvccSnapshot))
- return false;
-
- writer.incrementState();
-
- case 11:
if (!writer.writeCollection("readersFlags", readersFlags, MessageCollectionItemType.BOOLEAN))
return false;
writer.incrementState();
- case 12:
+ case 11:
if (!writer.writeInt("taskNameHash", taskNameHash))
return false;
writer.incrementState();
- case 13:
+ case 12:
if (!writer.writeAffinityTopologyVersion("topVer", topVer))
return false;
writer.incrementState();
- case 14:
+ case 13:
if (!writer.writeString("txLbl", txLbl))
return false;
writer.incrementState();
- case 15:
+ case 14:
if (!writer.writeMessage("ver", ver))
return false;
@@ -499,14 +479,6 @@
reader.incrementState();
case 10:
- mvccSnapshot = reader.readMessage("mvccSnapshot");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 11:
readersFlags = reader.readCollection("readersFlags", MessageCollectionItemType.BOOLEAN);
if (!reader.isLastRead())
@@ -514,7 +486,7 @@
reader.incrementState();
- case 12:
+ case 11:
taskNameHash = reader.readInt("taskNameHash");
if (!reader.isLastRead())
@@ -522,7 +494,7 @@
reader.incrementState();
- case 13:
+ case 12:
topVer = reader.readAffinityTopologyVersion("topVer");
if (!reader.isLastRead())
@@ -530,7 +502,7 @@
reader.incrementState();
- case 14:
+ case 13:
txLbl = reader.readString("txLbl");
if (!reader.isLastRead())
@@ -538,7 +510,7 @@
reader.incrementState();
- case 15:
+ case 14:
ver = reader.readMessage("ver");
if (!reader.isLastRead())
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetRequest.java
index 4097cab..a503e7e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetRequest.java
@@ -25,7 +25,6 @@
import org.apache.ignite.internal.processors.cache.GridCacheIdMessage;
import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
import org.apache.ignite.internal.processors.cache.KeyCacheObject;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
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;
@@ -82,9 +81,6 @@
/** Transaction label. */
private @Nullable String txLbl;
- /** */
- private MvccSnapshot mvccSnapshot;
-
/**
* Empty constructor required for {@link Message}.
*/
@@ -107,7 +103,6 @@
* @param needVer {@code True} if entry version is needed.
* @param addDepInfo Deployment info.
* @param txLbl Transaction label.
- * @param mvccSnapshot MVCC snapshot.
*/
public GridNearSingleGetRequest(
int cacheId,
@@ -123,8 +118,7 @@
boolean needVer,
boolean addDepInfo,
boolean recovery,
- @Nullable String txLbl,
- MvccSnapshot mvccSnapshot
+ @Nullable String txLbl
) {
assert key != null;
@@ -137,7 +131,6 @@
this.accessTtl = accessTtl;
this.addDepInfo = addDepInfo;
this.txLbl = txLbl;
- this.mvccSnapshot = mvccSnapshot;
if (readThrough)
flags |= READ_THROUGH_FLAG_MASK;
@@ -156,13 +149,6 @@
}
/**
- * @return Mvcc version.
- */
- @Nullable public MvccSnapshot mvccSnapshot() {
- return mvccSnapshot;
- }
-
- /**
* @return Key.
*/
public KeyCacheObject key() {
@@ -338,14 +324,6 @@
reader.incrementState();
case 9:
- mvccSnapshot = reader.readMessage("mvccSnapshot");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 10:
taskNameHash = reader.readInt("taskNameHash");
if (!reader.isLastRead())
@@ -353,7 +331,7 @@
reader.incrementState();
- case 11:
+ case 10:
topVer = reader.readAffinityTopologyVersion("topVer");
if (!reader.isLastRead())
@@ -361,7 +339,7 @@
reader.incrementState();
- case 12:
+ case 11:
txLbl = reader.readString("txLbl");
if (!reader.isLastRead())
@@ -420,24 +398,18 @@
writer.incrementState();
case 9:
- if (!writer.writeMessage("mvccSnapshot", mvccSnapshot))
- return false;
-
- writer.incrementState();
-
- case 10:
if (!writer.writeInt("taskNameHash", taskNameHash))
return false;
writer.incrementState();
- case 11:
+ case 10:
if (!writer.writeAffinityTopologyVersion("topVer", topVer))
return false;
writer.incrementState();
- case 12:
+ case 11:
if (!writer.writeString("txLbl", txLbl))
return false;
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
index 45d0176..0f83b2b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
@@ -763,7 +763,6 @@
null,
tx.size(),
tx.taskNameHash(),
- null,
tx.activeCachesDeploymentEnabled()
);
@@ -892,7 +891,6 @@
tx.activeCachesDeploymentEnabled(),
!waitRemoteTxs && (tx.needReturnValue() && tx.implicit()),
waitRemoteTxs,
- null,
null);
finishReq.checkCommitted(true);
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
index 4a7b75b..652e117 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
@@ -23,7 +23,6 @@
import org.apache.ignite.cache.CacheWriteSynchronizationMode;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxFinishRequest;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.util.tostring.GridToStringBuilder;
import org.apache.ignite.internal.util.typedef.internal.U;
@@ -31,7 +30,6 @@
import org.apache.ignite.plugin.extensions.communication.MessageReader;
import org.apache.ignite.plugin.extensions.communication.MessageWriter;
import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
/**
* Near transaction finish request.
@@ -43,9 +41,6 @@
/** Mini future ID. */
private int miniId;
- /** */
- private MvccSnapshot mvccSnapshot;
-
/**
* Empty constructor required for {@link Externalizable}.
*/
@@ -89,7 +84,6 @@
Collection<GridCacheVersion> rolledbackVers,
int txSize,
int taskNameHash,
- MvccSnapshot mvccSnapshot,
boolean addDepInfo) {
super(
xidVer,
@@ -112,15 +106,6 @@
explicitLock(explicitLock);
storeEnabled(storeEnabled);
-
- this.mvccSnapshot = mvccSnapshot;
- }
-
- /**
- * @return Mvcc info.
- */
- @Nullable public MvccSnapshot mvccSnapshot() {
- return mvccSnapshot;
}
/**
@@ -188,12 +173,6 @@
writer.incrementState();
- case 22:
- if (!writer.writeMessage("mvccSnapshot", mvccSnapshot))
- return false;
-
- writer.incrementState();
-
}
return true;
@@ -218,14 +197,6 @@
reader.incrementState();
- case 22:
- mvccSnapshot = reader.readMessage("mvccSnapshot");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
}
return reader.afterMessageRead(GridNearTxFinishRequest.class);
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
index 6766a50..3b00043 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
@@ -2763,7 +2763,6 @@
needVer,
/*keepCacheObject*/true,
recovery,
- null,
label()
).chain(f -> {
try {
@@ -2793,8 +2792,7 @@
skipVals,
needVer,
/*keepCacheObject*/true,
- label(),
- null
+ label()
).chain(f -> {
try {
Map<Object, Object> map = f.get();
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/consistency/GridNearReadRepairAbstractFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/consistency/GridNearReadRepairAbstractFuture.java
index 76e6e1d..36e193f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/consistency/GridNearReadRepairAbstractFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/consistency/GridNearReadRepairAbstractFuture.java
@@ -201,7 +201,6 @@
true,
true,
tx != null ? tx.label() : null,
- null,
node);
futs.put(mapping.getKey(), fut);
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccSnapshot.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccSnapshot.java
deleted file mode 100644
index 53bbff0..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccSnapshot.java
+++ /dev/null
@@ -1,43 +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 org.apache.ignite.plugin.extensions.communication.Message;
-
-/**
- * MVCC snapshot which holds the following information:
- * - Current MVCC version which should be used for visibility checks
- * - List of active transactions which should not be visible to current transaction
- * - Cleanup version which is used to help vacuum process.
- */
-public interface MvccSnapshot extends Message {
- /**
- * @return Cleanup version (all smaller versions are safe to remove).
- */
- public long cleanupVersion();
-
- /**
- * @return Version without active transactions.
- */
- public MvccSnapshot withoutActiveTransactions();
-
- /**
- * Increments operation counter.
- */
- public void incrementOperationCounter();
-}
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccSnapshotWithoutTxs.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccSnapshotWithoutTxs.java
deleted file mode 100644
index 2e58979..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccSnapshotWithoutTxs.java
+++ /dev/null
@@ -1,184 +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 org.apache.ignite.internal.managers.communication.GridIoMessageFactory;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.plugin.extensions.communication.MessageReader;
-import org.apache.ignite.plugin.extensions.communication.MessageWriter;
-
-/**
- *
- */
-public class MvccSnapshotWithoutTxs implements MvccSnapshot {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** */
- private long crdVer;
-
- /** */
- private long cntr;
-
- /** */
- private long cleanupVer;
-
- /** */
- private int opCntr;
-
- /**
- * Required by {@link GridIoMessageFactory}.
- */
- public MvccSnapshotWithoutTxs() {
- // No-op.
- }
-
- /**
- * @param crdVer Coordinator version.
- * @param cntr Counter.
- * @param cleanupVer Cleanup version.
- */
- public MvccSnapshotWithoutTxs(long crdVer, long cntr, int opCntr, long cleanupVer) {
- this.crdVer = crdVer;
- this.cntr = cntr;
- this.cleanupVer = cleanupVer;
- this.opCntr = opCntr;
- }
-
- /** {@inheritDoc} */
- @Override public long cleanupVersion() {
- return cleanupVer;
- }
-
- /** {@inheritDoc} */
- @Override public void incrementOperationCounter() {
- throw new UnsupportedOperationException();
- }
-
- /** {@inheritDoc} */
- @Override public MvccSnapshot withoutActiveTransactions() {
- return this;
- }
-
- /** {@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.writeLong("cleanupVer", cleanupVer))
- return false;
-
- writer.incrementState();
-
- case 1:
- if (!writer.writeLong("cntr", cntr))
- return false;
-
- writer.incrementState();
-
- case 2:
- if (!writer.writeLong("crdVer", crdVer))
- return false;
-
- writer.incrementState();
-
- case 3:
- if (!writer.writeInt("opCntr", opCntr))
- 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:
- cleanupVer = reader.readLong("cleanupVer");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 1:
- cntr = reader.readLong("cntr");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 2:
- crdVer = reader.readLong("crdVer");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 3:
- opCntr = reader.readInt("opCntr");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- }
-
- return reader.afterMessageRead(MvccSnapshotWithoutTxs.class);
- }
-
- /** {@inheritDoc} */
- @Override public short directType() {
- return 150;
- }
-
- /** {@inheritDoc} */
- @Override public byte fieldsCount() {
- return 4;
- }
-
- /** {@inheritDoc} */
- @Override public void onAckReceived() {
- // No-op.
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(MvccSnapshotWithoutTxs.class, this);
- }
-}
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/txlog/TxState.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/txlog/TxState.java
deleted file mode 100644
index f969a70..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/txlog/TxState.java
+++ /dev/null
@@ -1,37 +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.txlog;
-
-/**
- *
- */
-public final class TxState {
- /** */
- public static final byte NA = 0x0;
-
- /** */
- public static final byte PREPARED = 0x1;
-
- /** */
- public static final byte COMMITTED = 0x3;
-
- /**
- * Private constructor.
- */
- private TxState() {}
-}
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
index 0ae545f..12fd42a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
@@ -73,7 +73,6 @@
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.IgniteHistoricalIteratorException;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointListener;
import org.apache.ignite.internal.processors.cache.persistence.freelist.AbstractFreeList;
import org.apache.ignite.internal.processors.cache.persistence.freelist.CacheFreeList;
@@ -2545,17 +2544,6 @@
}
/** {@inheritDoc} */
- @Override public GridCursor<? extends CacheDataRow> cursor(MvccSnapshot mvccSnapshot)
- throws IgniteCheckedException {
- CacheDataStore delegate = init0(true);
-
- if (delegate != null)
- return delegate.cursor(mvccSnapshot);
-
- return EMPTY_CURSOR;
- }
-
- /** {@inheritDoc} */
@Override public GridCursor<? extends CacheDataRow> cursor(
int cacheId,
KeyCacheObject lower,
@@ -2583,21 +2571,6 @@
}
/** {@inheritDoc} */
- @Override public GridCursor<? extends CacheDataRow> cursor(int cacheId,
- KeyCacheObject lower,
- KeyCacheObject upper,
- Object x,
- MvccSnapshot mvccSnapshot)
- throws IgniteCheckedException {
- CacheDataStore delegate = init0(true);
-
- if (delegate != null)
- return delegate.cursor(cacheId, lower, upper, x, mvccSnapshot);
-
- return EMPTY_CURSOR;
- }
-
- /** {@inheritDoc} */
@Override public void destroy() throws IgniteCheckedException {
// No need to destroy delegate.
@@ -2640,17 +2613,6 @@
}
/** {@inheritDoc} */
- @Override public GridCursor<? extends CacheDataRow> cursor(int cacheId,
- MvccSnapshot mvccSnapshot) throws IgniteCheckedException {
- CacheDataStore delegate = init0(true);
-
- if (delegate != null)
- return delegate.cursor(cacheId, mvccSnapshot);
-
- return EMPTY_CURSOR;
- }
-
- /** {@inheritDoc} */
@Override public void clear(int cacheId) throws IgniteCheckedException {
assert grp.shared().database().checkpointLockIsHeldByThread();
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
index a541353..0bbb9ca 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java
@@ -263,7 +263,6 @@
req.includeMetaData(),
req.keepBinary(),
req.taskHash(),
- req.mvccSnapshot(),
req.isDataPageScanEnabled()
);
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
index 3597b573..e2a78a2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
@@ -46,7 +46,6 @@
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtUnreservedPartitionException;
import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionTopology;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.query.QueryUtils;
import org.apache.ignite.internal.util.GridCloseableIteratorAdapter;
import org.apache.ignite.internal.util.GridEmptyCloseableIterator;
@@ -134,9 +133,6 @@
private int taskHash;
/** */
- private MvccSnapshot mvccSnapshot;
-
- /** */
private Boolean dataPageScanEnabled;
/**
@@ -243,7 +239,6 @@
* @param incMeta Include metadata flag.
* @param keepBinary Keep binary flag.
* @param taskHash Task hash.
- * @param mvccSnapshot Mvcc version.
* @param dataPageScanEnabled Flag to enable data page scan.
*/
public GridCacheQueryAdapter(
@@ -264,7 +259,6 @@
boolean incMeta,
boolean keepBinary,
int taskHash,
- MvccSnapshot mvccSnapshot,
Boolean dataPageScanEnabled
) {
this.cctx = cctx;
@@ -284,7 +278,6 @@
this.incMeta = incMeta;
this.keepBinary = keepBinary;
this.taskHash = taskHash;
- this.mvccSnapshot = mvccSnapshot;
this.dataPageScanEnabled = dataPageScanEnabled;
}
@@ -327,13 +320,6 @@
}
/**
- * @return MVCC snapshot.
- */
- @Nullable MvccSnapshot mvccSnapshot() {
- return mvccSnapshot;
- }
-
- /**
* @return Type.
*/
public GridCacheQueryType type() {
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
index 64d6b9a..6a3234b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
@@ -853,7 +853,7 @@
locPart = locPart0;
- it = cctx.offheap().cachePartitionIterator(cctx.cacheId(), part, qry.mvccSnapshot(),
+ it = cctx.offheap().cachePartitionIterator(cctx.cacheId(), part,
qry.isDataPageScanEnabled());
}
else {
@@ -869,7 +869,7 @@
}
it = cctx.offheap().cacheIterator(cctx.cacheId(), true, backups, topVer,
- qry.mvccSnapshot(), qry.isDataPageScanEnabled());
+ qry.isDataPageScanEnabled());
}
ScanQueryIterator iter = new ScanQueryIterator(it, qry, topVer, locPart,
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
index e5db01d..16aa952 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
@@ -26,7 +26,6 @@
import org.apache.ignite.internal.processors.cache.GridCacheDeployable;
import org.apache.ignite.internal.processors.cache.GridCacheIdMessage;
import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.util.tostring.GridToStringInclude;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.internal.CU;
@@ -149,9 +148,6 @@
private AffinityTopologyVersion topVer;
/** */
- private MvccSnapshot mvccSnapshot;
-
- /** */
private byte flags;
/**
@@ -196,7 +192,6 @@
qry.keepBinary(),
qry.taskHash(),
cctx.affinity().affinityTopologyVersion(),
- qry.mvccSnapshot(),
// Force deployment anyway if scan query is used.
cctx.deploymentEnabled() || deployFilterOrTransformer,
qry.isDataPageScanEnabled());
@@ -332,7 +327,6 @@
* @param keepBinary Keep binary flag.
* @param taskHash Task name hash code.
* @param topVer Topology version.
- * @param mvccSnapshot Mvcc snapshot.
* @param addDepInfo Deployment info flag.
*/
private GridCacheQueryRequest(
@@ -356,7 +350,6 @@
boolean keepBinary,
int taskHash,
AffinityTopologyVersion topVer,
- MvccSnapshot mvccSnapshot,
boolean addDepInfo,
Boolean dataPageScanEnabled
) {
@@ -384,7 +377,6 @@
this.keepBinary = keepBinary;
this.taskHash = taskHash;
this.topVer = topVer;
- this.mvccSnapshot = mvccSnapshot;
this.addDepInfo = addDepInfo;
flags = setDataPageScanEnabled(flags, dataPageScanEnabled);
@@ -405,13 +397,6 @@
return (byte)flags;
}
- /**
- * @return Mvcc version.
- */
- @Nullable MvccSnapshot mvccSnapshot() {
- return mvccSnapshot;
- }
-
/** {@inheritDoc} */
@Override public AffinityTopologyVersion topologyVersion() {
return topVer != null ? topVer : AffinityTopologyVersion.NONE;
@@ -752,60 +737,54 @@
writer.incrementState();
case 17:
- if (!writer.writeMessage("mvccSnapshot", mvccSnapshot))
- return false;
-
- writer.incrementState();
-
- case 18:
if (!writer.writeInt("pageSize", pageSize))
return false;
writer.incrementState();
- case 19:
+ case 18:
if (!writer.writeInt("part", part))
return false;
writer.incrementState();
- case 20:
+ case 19:
if (!writer.writeByteArray("rdcBytes", rdcBytes))
return false;
writer.incrementState();
- case 21:
+ case 20:
if (!writer.writeInt("limit", limit))
return false;
writer.incrementState();
- case 22:
+ case 21:
if (!writer.writeInt("taskHash", taskHash))
return false;
writer.incrementState();
- case 23:
+ case 22:
if (!writer.writeAffinityTopologyVersion("topVer", topVer))
return false;
writer.incrementState();
- case 24:
+ case 23:
if (!writer.writeByteArray("transBytes", transBytes))
return false;
writer.incrementState();
- case 25:
+ case 24:
if (!writer.writeByte("type", type != null ? (byte)type.ordinal() : -1))
return false;
writer.incrementState();
- case 26:
+ case 25:
if (!writer.writeByteArray("idxQryDescBytes", idxQryDescBytes))
return false;
@@ -931,14 +910,6 @@
reader.incrementState();
case 17:
- mvccSnapshot = reader.readMessage("mvccSnapshot");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 18:
pageSize = reader.readInt("pageSize");
if (!reader.isLastRead())
@@ -946,7 +917,7 @@
reader.incrementState();
- case 19:
+ case 18:
part = reader.readInt("part");
if (!reader.isLastRead())
@@ -954,7 +925,7 @@
reader.incrementState();
- case 20:
+ case 19:
rdcBytes = reader.readByteArray("rdcBytes");
if (!reader.isLastRead())
@@ -962,7 +933,7 @@
reader.incrementState();
- case 21:
+ case 20:
limit = reader.readInt("limit");
if (!reader.isLastRead())
@@ -970,7 +941,7 @@
reader.incrementState();
- case 22:
+ case 21:
taskHash = reader.readInt("taskHash");
if (!reader.isLastRead())
@@ -978,7 +949,7 @@
reader.incrementState();
- case 23:
+ case 22:
topVer = reader.readAffinityTopologyVersion("topVer");
if (!reader.isLastRead())
@@ -986,7 +957,7 @@
reader.incrementState();
- case 24:
+ case 23:
transBytes = reader.readByteArray("transBytes");
if (!reader.isLastRead())
@@ -994,7 +965,7 @@
reader.incrementState();
- case 25:
+ case 24:
byte typeOrd;
typeOrd = reader.readByte("type");
@@ -1006,7 +977,7 @@
reader.incrementState();
- case 26:
+ case 25:
idxQryDescBytes = reader.readByteArray("idxQryDescBytes");
if (!reader.isLastRead())
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
index 186ef12..085eae0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
@@ -791,7 +791,6 @@
true,
true,
AffinityTopologyVersion.NONE,
- null,
null);
locLsnr.onUpdated(new Iterable<CacheEntryEvent>() {
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/task/GatherPartitionStatistics.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/task/GatherPartitionStatistics.java
index b14d236..ef4e0a7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/task/GatherPartitionStatistics.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/task/GatherPartitionStatistics.java
@@ -266,7 +266,7 @@
GridQueryRowDescriptor rowDesc = new GridQueryRowDescriptorImpl(gathCtx.cacheContextInfo(), tbl);
for (CacheDataRow row : grp.offheap().cachePartitionIterator(gathCtx.cacheContextInfo().cacheId(), partId,
- null, false)) {
+ false)) {
if (--checkInt == 0) {
if (gathCtx.future().isCancelled())
throw new GatherStatisticCancelException();
diff --git a/modules/core/src/main/resources/META-INF/classnames.properties b/modules/core/src/main/resources/META-INF/classnames.properties
index 4507cd1..5b1158b 100644
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@ -1122,8 +1122,6 @@
org.apache.ignite.internal.processors.cache.dr.GridCacheDrExpirationInfo
org.apache.ignite.internal.processors.cache.dr.GridCacheDrInfo
org.apache.ignite.internal.processors.cache.mvcc.DeadlockProbe
-org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot
-org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshotWithoutTxs
org.apache.ignite.internal.processors.cache.mvcc.ProbedTx
org.apache.ignite.internal.processors.cache.persistence.CacheDataRowAdapter$RowData
org.apache.ignite.internal.processors.cache.persistence.CheckpointState
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
index c5a8dd0..c73b963 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
@@ -615,8 +615,6 @@
@Override public boolean initialValue(
CacheObject val,
GridCacheVersion ver,
- byte mvccTxState,
- byte newMvccTxState,
long ttl,
long expireTime,
boolean preload,
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPartitionPreloadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPartitionPreloadTest.java
index 7b1b05f..236f00f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPartitionPreloadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPartitionPreloadTest.java
@@ -457,7 +457,7 @@
// After partition preloading no pages should be read from store.
GridIterator<CacheDataRow> cursor = ((IgniteEx)testNode).cachex(DEFAULT_CACHE_NAME).context().offheap().
- cachePartitionIterator(CU.UNDEFINED_CACHE_ID, preloadPart, null, false);
+ cachePartitionIterator(CU.UNDEFINED_CACHE_ID, preloadPart, false);
int realSize = 0;
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteClusterSnapshotCheckTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteClusterSnapshotCheckTest.java
index 2ad3d6a..eaa1e07 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteClusterSnapshotCheckTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteClusterSnapshotCheckTest.java
@@ -63,7 +63,6 @@
import org.apache.ignite.internal.processors.cache.GridCacheEntryEx;
import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
import org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl;
-import org.apache.ignite.internal.processors.cache.mvcc.txlog.TxState;
import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager;
import org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointListener;
@@ -436,8 +435,6 @@
new GridCacheVersion(row0.version().topologyVersion(),
row0.version().nodeOrder(),
row0.version().order() + 1),
- TxState.NA,
- TxState.NA,
TTL_ETERNAL,
row0.expireTime(),
true,
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 47c4f59..eb06429 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -405,7 +405,6 @@
filter,
null,
null,
- null,
true
);
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2PkHashIndex.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2PkHashIndex.java
index 63ac318..6618fab 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2PkHashIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2PkHashIndex.java
@@ -27,7 +27,6 @@
import org.apache.ignite.internal.processors.cache.GridCacheContext;
import org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManager;
import org.apache.ignite.internal.processors.cache.KeyCacheObject;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
import org.apache.ignite.internal.processors.cache.tree.CacheDataRowStore;
import org.apache.ignite.internal.processors.query.GridQueryTypeDescriptor;
@@ -96,7 +95,6 @@
/** {@inheritDoc} */
@Override public Cursor find(Session ses, final SearchRow lower, final SearchRow upper) {
IndexingQueryCacheFilter filter = null;
- MvccSnapshot mvccSnapshot = null;
QueryContext qctx = H2Utils.context(ses);
@@ -105,7 +103,6 @@
if (qctx != null) {
IndexingQueryFilter f = qctx.filter();
filter = f != null ? f.forCache(getTable().cacheName()) : null;
- mvccSnapshot = qctx.mvccSnapshot();
seg = qctx.segment();
}
@@ -124,7 +121,7 @@
continue;
if (filter == null || filter.applyPartition(part))
- cursors.add(store.cursor(cctx.cacheId(), lowerObj, upperObj, null, mvccSnapshot));
+ cursors.add(store.cursor(cctx.cacheId(), lowerObj, upperObj, null));
}
return new H2PkHashIndexCursor(cursors.iterator());
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
index 832fb3e..12a7144 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
@@ -227,7 +227,7 @@
if (qctx == null)
return null;
- return new IndexQueryContext(qctx.filter(), null, qctx.mvccSnapshot());
+ return new IndexQueryContext(qctx.filter(), null);
}
/** */
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/QueryContext.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/QueryContext.java
index 7e2628f..8930a89 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/QueryContext.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/QueryContext.java
@@ -18,7 +18,6 @@
package org.apache.ignite.internal.processors.query.h2.opt;
import java.util.Objects;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.query.h2.opt.join.DistributedJoinContext;
import org.apache.ignite.internal.processors.query.h2.twostep.PartitionReservation;
import org.apache.ignite.internal.util.typedef.internal.S;
@@ -45,9 +44,6 @@
private final DistributedJoinContext distributedJoinCtx;
/** */
- private final MvccSnapshot mvccSnapshot;
-
- /** */
private final PartitionReservation reservations;
/** {@code True} for local queries, {@code false} for distributed ones. */
@@ -59,7 +55,6 @@
* @param segment Index segment ID.
* @param filter Filter.
* @param distributedJoinCtx Distributed join context.
- * @param mvccSnapshot MVCC snapshot.
* @param loc {@code True} for local queries, {@code false} for distributed ones.
*/
@SuppressWarnings("AssignmentOrReturnOfFieldWithMutableType")
@@ -67,14 +62,12 @@
int segment,
@Nullable IndexingQueryFilter filter,
@Nullable DistributedJoinContext distributedJoinCtx,
- @Nullable MvccSnapshot mvccSnapshot,
@Nullable PartitionReservation reservations,
boolean loc
) {
this.segment = segment;
this.filter = filter;
this.distributedJoinCtx = distributedJoinCtx;
- this.mvccSnapshot = mvccSnapshot;
this.reservations = reservations;
this.loc = loc;
}
@@ -90,18 +83,10 @@
filter,
null,
null,
- null,
local);
}
/**
- * @return Mvcc snapshot.
- */
- @Nullable public MvccSnapshot mvccSnapshot() {
- return mvccSnapshot;
- }
-
- /**
* @return Distributed join context.
*/
@Nullable public DistributedJoinContext distributedJoinContext() {
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
index 12dce9d..aa9923b 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
@@ -48,7 +48,6 @@
import org.apache.ignite.internal.metric.IoStatisticsQueryHelper;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.GridCacheContext;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.query.CacheQueryType;
import org.apache.ignite.internal.processors.cache.query.GridCacheQueryType;
import org.apache.ignite.internal.processors.cache.query.GridCacheSqlQuery;
@@ -83,7 +82,6 @@
import org.h2.jdbc.JdbcResultSet;
import org.h2.value.Value;
import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
import static org.apache.ignite.events.EventType.EVT_CACHE_QUERY_EXECUTED;
import static org.apache.ignite.internal.cache.query.index.sorted.inline.InlineIndexImpl.calculateSegment;
@@ -269,7 +267,6 @@
timeout,
params,
lazy,
- req.mvccSnapshot(),
dataPageScanEnabled,
treatReplicatedAsPartitioned
);
@@ -298,7 +295,6 @@
timeout,
params,
lazy,
- req.mvccSnapshot(),
dataPageScanEnabled,
treatReplicatedAsPartitioned
);
@@ -326,7 +322,6 @@
* @param timeout Query timeout.
* @param params Query parameters.
* @param lazy Streaming flag.
- * @param mvccSnapshot MVCC snapshot.
* @param dataPageScanEnabled If data page scan is enabled.
*/
private void onQueryRequest0(
@@ -347,7 +342,6 @@
final int timeout,
final Object[] params,
boolean lazy,
- @Nullable final MvccSnapshot mvccSnapshot,
Boolean dataPageScanEnabled,
boolean treatReplicatedAsPartitioned
) {
@@ -409,7 +403,6 @@
segmentId,
h2.backupFilter(topVer, parts, treatReplicatedAsPartitioned),
distributedJoinCtx,
- mvccSnapshot,
reserved,
true);
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
index 79f4a30..3fdadab 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
@@ -496,7 +496,6 @@
null,
null,
null,
- null,
true);
H2Utils.setupConnection(conn, qctx, false, enforceJoinOrder);
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java
index 28b56a74..b493b5a 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java
@@ -33,7 +33,6 @@
import org.apache.ignite.internal.binary.BinaryMarshaller;
import org.apache.ignite.internal.binary.BinaryUtils;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.query.GridCacheQueryMarshallable;
import org.apache.ignite.internal.processors.cache.query.GridCacheSqlQuery;
import org.apache.ignite.internal.processors.query.h2.QueryTable;
@@ -46,7 +45,6 @@
import org.apache.ignite.plugin.extensions.communication.MessageCollectionItemType;
import org.apache.ignite.plugin.extensions.communication.MessageReader;
import org.apache.ignite.plugin.extensions.communication.MessageWriter;
-import org.jetbrains.annotations.Nullable;
import static org.apache.ignite.internal.processors.cache.query.GridCacheSqlQuery.EMPTY_PARAMS;
@@ -155,9 +153,6 @@
/** Schema name. */
private String schemaName;
- /** */
- private MvccSnapshot mvccSnapshot;
-
/** Id of the query assigned by {@link RunningQueryManager} on originator node. */
private long qryId;
@@ -188,29 +183,11 @@
params = req.params;
paramsBytes = req.paramsBytes;
schemaName = req.schemaName;
- mvccSnapshot = req.mvccSnapshot;
qryId = req.qryId;
explicitTimeout = req.explicitTimeout;
}
/**
- * @return MVCC snapshot.
- */
- @Nullable public MvccSnapshot mvccSnapshot() {
- return mvccSnapshot;
- }
-
- /**
- * @param mvccSnapshot MVCC snapshot version.
- * @return {@code this}.
- */
- public GridH2QueryRequest mvccSnapshot(MvccSnapshot mvccSnapshot) {
- this.mvccSnapshot = mvccSnapshot;
-
- return this;
- }
-
- /**
* @return Parameters.
*/
public Object[] parameters() {
@@ -658,18 +635,12 @@
writer.incrementState();
case 12:
- if (!writer.writeMessage("mvccSnapshot", mvccSnapshot))
- return false;
-
- writer.incrementState();
-
- case 13:
if (!writer.writeBoolean("explicitTimeout", explicitTimeout))
return false;
writer.incrementState();
- case 14:
+ case 13:
if (!writer.writeLong("qryId", qryId))
return false;
@@ -784,14 +755,6 @@
reader.incrementState();
case 12:
- mvccSnapshot = reader.readMessage("mvccSnapshot");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 13:
explicitTimeout = reader.readBoolean("explicitTimeout");
if (!reader.isLastRead())
@@ -799,7 +762,7 @@
reader.incrementState();
- case 14:
+ case 13:
qryId = reader.readLong("qryId");
if (!reader.isLastRead())