Skip to content

Commit

Permalink
IGNITE-21346 Removal of MVCC code from GridCacheEntryEx and IgniteCac…
Browse files Browse the repository at this point in the history
…heOffheapManager (#11225)
  • Loading branch information
shishkovilja committed Feb 26, 2024
1 parent aed3a60 commit a86f88b
Show file tree
Hide file tree
Showing 16 changed files with 90 additions and 3,030 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
import org.apache.ignite.internal.processors.cache.CacheObjectByteArrayImpl;
import org.apache.ignite.internal.processors.cache.CacheObjectImpl;
import org.apache.ignite.internal.processors.cache.GridCacheEntryInfo;
import org.apache.ignite.internal.processors.cache.GridCacheMvccEntryInfo;
import org.apache.ignite.internal.processors.cache.GridCacheReturn;
import org.apache.ignite.internal.processors.cache.GridChangeGlobalStateMessageResponse;
import org.apache.ignite.internal.processors.cache.KeyCacheObjectImpl;
Expand Down Expand Up @@ -318,7 +317,6 @@ public class GridIoMessageFactory implements MessageFactoryProvider {
factory.register((short)133, ClusterMetricsUpdateMessage::new);
factory.register((short)134, ContinuousRoutineStartResultMessage::new);
factory.register((short)135, LatchAckMessage::new);
factory.register((short)143, GridCacheMvccEntryInfo::new);
factory.register((short)148, MvccVersionImpl::new);
factory.register((short)150, MvccSnapshotWithoutTxs::new);
factory.register((short)157, PartitionUpdateCountersMessage::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,14 @@
package org.apache.ignite.internal.processors.cache;

import java.util.Collection;
import java.util.List;
import java.util.UUID;
import javax.cache.Cache;
import javax.cache.processor.EntryProcessor;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.cache.eviction.EvictableEntry;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockCancelledException;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocalAdapter;
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.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.mvcc.MvccVersion;
import org.apache.ignite.internal.processors.cache.mvcc.txlog.TxState;
import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
Expand All @@ -39,7 +35,6 @@
import org.apache.ignite.internal.processors.cache.version.GridCacheVersionedEntryEx;
import org.apache.ignite.internal.processors.dr.GridDrType;
import org.apache.ignite.internal.processors.query.schema.SchemaIndexCacheVisitorClosure;
import org.apache.ignite.lang.IgniteUuid;
import org.jetbrains.annotations.Nullable;

/**
Expand Down Expand Up @@ -326,78 +321,6 @@ public EntryGetResult innerGetAndReserveForLoad(boolean updateMetrics,
*/
@Nullable public CacheObject innerReload() throws IgniteCheckedException, GridCacheEntryRemovedException;

/**
* @param tx Cache transaction.
* @param affNodeId Partitioned node iD.
* @param val Value to set.
* @param entryProc Entry processor.
* @param invokeArgs Entry processor invoke arguments.
* @param ttl0 TTL.
* @param topVer Topology version.
* @param mvccVer Mvcc version.
* @param op Cache operation.
* @param needHistory Whether to collect rows created or affected by the current tx.
* @param noCreate Entry should not be created when enabled, e.g. SQL INSERT.
* @param needOldVal Flag if it is need to return the old value (value before current tx has been started).
* @param filter Filter.
* @param retVal Previous value return flag.
* @param keepBinary Keep binary flag.
* @return Tuple containing success flag and old value. If success is {@code false},
* then value is {@code null}.
* @throws IgniteCheckedException If storing value failed.
* @throws GridCacheEntryRemovedException If entry has been removed.
*/
public GridCacheUpdateTxResult mvccSet(
@Nullable IgniteInternalTx tx,
UUID affNodeId,
CacheObject val,
EntryProcessor entryProc,
Object[] invokeArgs,
long ttl0,
AffinityTopologyVersion topVer,
MvccSnapshot mvccVer,
GridCacheOperation op,
boolean needHistory,
boolean noCreate,
boolean needOldVal,
@Nullable CacheEntryPredicate filter,
boolean retVal,
boolean keepBinary) throws IgniteCheckedException, GridCacheEntryRemovedException;

/**
* @param tx Cache transaction.
* @param affNodeId Partitioned node iD.
* @param topVer Topology version.
* @param mvccVer Mvcc version.
* @param needHist Whether to collect rows created or affected by the current tx.
* @param needOldValue Flag if it is need to return the old value (value before current tx has been started).
* @param filter Filter.
* @param retVal Previous value return flag.
* @return Tuple containing success flag and old value. If success is {@code false},
* then value is {@code null}.
* @throws IgniteCheckedException If storing value failed.
* @throws GridCacheEntryRemovedException If entry has been removed.
*/
public GridCacheUpdateTxResult mvccRemove(
@Nullable IgniteInternalTx tx,
UUID affNodeId,
AffinityTopologyVersion topVer,
MvccSnapshot mvccVer,
boolean needHist,
boolean needOldValue,
@Nullable CacheEntryPredicate filter,
boolean retVal) throws IgniteCheckedException, GridCacheEntryRemovedException;

/**
* @param tx Transaction adapter.
* @param mvccVer Mvcc version.
* @return Lock result.
* @throws GridCacheEntryRemovedException If entry has been removed.
* @throws IgniteCheckedException If locking failed
*/
GridCacheUpdateTxResult mvccLock(GridDhtTxLocalAdapter tx,
MvccSnapshot mvccVer) throws GridCacheEntryRemovedException, IgniteCheckedException;

/**
* @param tx Cache transaction.
* @param evtNodeId ID of node responsible for this change.
Expand Down Expand Up @@ -644,16 +567,6 @@ public boolean tmLock(IgniteInternalTx tx,
*/
public boolean checkSerializableReadVersion(GridCacheVersion serReadVer) throws GridCacheEntryRemovedException;

/**
* Retrieves the last committed MVCC entry version.
* @param onheapOnly {@code True} if a specified peek mode instructs to look only in the on-heap storage.
* @return Last committed entry if either or {@code null} otherwise.
* @throws GridCacheEntryRemovedException If entry has been removed.
* @throws IgniteCheckedException If failed.
*/
@Nullable public CacheObject mvccPeek(boolean onheapOnly)
throws GridCacheEntryRemovedException, IgniteCheckedException;

/**
* Peeks into entry without loading value or updating statistics.
*
Expand Down Expand Up @@ -1173,42 +1086,6 @@ public void updateIndex(
*/
public boolean lockedByCurrentThread();

/**
*
* @param tx Transaction.
* @param affNodeId Affinity node id.
* @param topVer Topology version.
* @param entries Entries.
* @param op Cache operation.
* @param mvccVer Mvcc version.
* @param futId Future id.
* @param batchNum Batch number.
* @return Update result.
* @throws IgniteCheckedException, If failed.
* @throws GridCacheEntryRemovedException, If entry has been removed.
*/
public GridCacheUpdateTxResult mvccUpdateRowsWithPreloadInfo(
IgniteInternalTx tx,
UUID affNodeId,
AffinityTopologyVersion topVer,
List<GridCacheEntryInfo> entries,
GridCacheOperation op,
MvccSnapshot mvccVer,
IgniteUuid futId,
int batchNum)
throws IgniteCheckedException, GridCacheEntryRemovedException;

/**
* Apply entry history if not exists.
*
* @param entries Entries.
* @return {@code True} if initial value was set.
* @throws IgniteCheckedException, If failed.
* @throws GridCacheEntryRemovedException, If entry has been removed.
*/
public boolean mvccPreloadEntry(List<GridCacheMvccEntryInfo> entries)
throws IgniteCheckedException, GridCacheEntryRemovedException;

/**
* Touch this entry in its context's eviction manager.
*
Expand Down
Loading

0 comments on commit a86f88b

Please sign in to comment.