Search in sources :

Example 1 with IgniteConsistencyViolationException

use of org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException in project ignite by apache.

the class GridCacheAdapter method getWithRepairAsync.

/**
 * Performs repair and retries get if necessary.
 * @param orig Original get future.
 * @param repair Repair callback, used in case of inconcstency.
 * @param retry Callback to original method to retry operation after repair.
 */
private <R> IgniteInternalFuture<R> getWithRepairAsync(IgniteInternalFuture<R> orig, Function<Collection<KeyCacheObject>, IgniteInternalFuture<Void>> repair, Supplier<IgniteInternalFuture<R>> retry) {
    final GridNearTxLocal tx = checkCurrentTx();
    final CacheOperationContext opCtx = ctx.operationContextPerCall();
    GridFutureAdapter<R> fut = new GridFutureAdapter<>();
    orig.listen((f) -> {
        try {
            fut.onDone(f.get());
        } catch (IgniteConsistencyViolationException e1) {
            repair.apply(e1.keys()).listen((repFut) -> {
                if (repFut.error() != null)
                    fut.onDone(repFut.error());
                else {
                    CacheOperationContext prevOpCtx = ctx.operationContextPerCall();
                    // Within the original tx.
                    IgniteInternalTx prevTx = ctx.tm().tx(tx);
                    // With the same operation context.
                    ctx.operationContextPerCall(opCtx);
                    try {
                        fut.onDone(retry.get().get());
                    } catch (IgniteCheckedException e2) {
                        fut.onDone(e2);
                    } finally {
                        ctx.tm().tx(prevTx);
                        ctx.operationContextPerCall(prevOpCtx);
                    }
                }
            });
        } catch (IgniteCheckedException e1) {
            fut.onDone(e1);
        }
    });
    return fut;
}
Also used : IgnitionEx(org.apache.ignite.internal.IgnitionEx) IgniteTxRollbackCheckedException(org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException) GridFutureAdapter(org.apache.ignite.internal.util.future.GridFutureAdapter) GridFinishedFuture(org.apache.ignite.internal.util.future.GridFinishedFuture) IgniteTxLocalAdapter(org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter) EntryProcessor(javax.cache.processor.EntryProcessor) GridSerializableMap(org.apache.ignite.internal.util.GridSerializableMap) MetricUtils.cacheMetricsRegistryName(org.apache.ignite.internal.processors.metric.impl.MetricUtils.cacheMetricsRegistryName) Map(java.util.Map) Cache(javax.cache.Cache) InvalidObjectException(java.io.InvalidObjectException) DFLT_ALLOW_ATOMIC_OPS_IN_TX(org.apache.ignite.internal.processors.cache.CacheOperationContext.DFLT_ALLOW_ATOMIC_OPS_IN_TX) ClusterGroup(org.apache.ignite.cluster.ClusterGroup) IgniteKernal(org.apache.ignite.internal.IgniteKernal) TC_NO_FAILOVER(org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_NO_FAILOVER) ComputeJobContext(org.apache.ignite.compute.ComputeJobContext) IgniteInClosure(org.apache.ignite.lang.IgniteInClosure) Externalizable(java.io.Externalizable) IgniteTxTimeoutCheckedException(org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException) GridToStringExclude(org.apache.ignite.internal.util.tostring.GridToStringExclude) CIX2(org.apache.ignite.internal.util.typedef.CIX2) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) CIX3(org.apache.ignite.internal.util.typedef.CIX3) TransactionConcurrency(org.apache.ignite.transactions.TransactionConcurrency) Set(java.util.Set) IgniteRunnable(org.apache.ignite.lang.IgniteRunnable) IgniteInstanceResource(org.apache.ignite.resources.IgniteInstanceResource) READ_COMMITTED(org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED) ComputeTaskInternalFuture(org.apache.ignite.internal.ComputeTaskInternalFuture) CacheDataRow(org.apache.ignite.internal.processors.cache.persistence.CacheDataRow) Executors(java.util.concurrent.Executors) IgniteCache(org.apache.ignite.IgniteCache) GridCacheAffinityImpl(org.apache.ignite.internal.processors.cache.affinity.GridCacheAffinityImpl) GridCacheRawVersionedEntry(org.apache.ignite.internal.processors.cache.version.GridCacheRawVersionedEntry) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) GridDhtPartitionTopology(org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionTopology) PESSIMISTIC(org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC) PlatformCacheEntryFilter(org.apache.ignite.internal.processors.platform.cache.PlatformCacheEntryFilter) TransactionIsolation(org.apache.ignite.transactions.TransactionIsolation) IgniteBiPredicate(org.apache.ignite.lang.IgniteBiPredicate) ComputeJob(org.apache.ignite.compute.ComputeJob) EntryProcessorResult(javax.cache.processor.EntryProcessorResult) Affinity(org.apache.ignite.cache.affinity.Affinity) IgniteTxLocalEx(org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalEx) U(org.apache.ignite.internal.util.typedef.internal.U) Callable(java.util.concurrent.Callable) IgniteLogger(org.apache.ignite.IgniteLogger) IgniteDrDataStreamerCacheUpdater(org.apache.ignite.internal.processors.dr.IgniteDrDataStreamerCacheUpdater) SecurityPermission(org.apache.ignite.plugin.security.SecurityPermission) Supplier(java.util.function.Supplier) EntryProcessorException(javax.cache.processor.EntryProcessorException) ArrayList(java.util.ArrayList) ClusterNode(org.apache.ignite.cluster.ClusterNode) CI1(org.apache.ignite.internal.util.typedef.CI1) ComputeJobResult(org.apache.ignite.compute.ComputeJobResult) IgniteInternalTx(org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx) MvccUtils(org.apache.ignite.internal.processors.cache.mvcc.MvccUtils) S(org.apache.ignite.internal.util.typedef.internal.S) IgniteInterruptedCheckedException(org.apache.ignite.internal.IgniteInterruptedCheckedException) ClusterTopologyServerNotFoundException(org.apache.ignite.internal.cluster.ClusterTopologyServerNotFoundException) GridInternal(org.apache.ignite.internal.processors.task.GridInternal) C2(org.apache.ignite.internal.util.typedef.C2) C1(org.apache.ignite.internal.util.typedef.C1) ExpiryPolicy(javax.cache.expiry.ExpiryPolicy) A(org.apache.ignite.internal.util.typedef.internal.A) IOException(java.io.IOException) Ignite(org.apache.ignite.Ignite) GridDhtInvalidPartitionException(org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtInvalidPartitionException) DataStreamerImpl(org.apache.ignite.internal.processors.datastreamer.DataStreamerImpl) T2(org.apache.ignite.internal.util.typedef.T2) ObjectStreamException(java.io.ObjectStreamException) GridDhtCacheAdapter(org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter) GridDhtLocalPartition(org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition) IgniteConsistencyViolationException(org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException) TransactionCheckedException(org.apache.ignite.internal.transactions.TransactionCheckedException) MvccSnapshot(org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot) BROADCAST(org.apache.ignite.internal.GridClosureCallMode.BROADCAST) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) GridCacheDrInfo(org.apache.ignite.internal.processors.cache.dr.GridCacheDrInfo) CX1(org.apache.ignite.internal.util.typedef.CX1) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) IgniteExternalizableExpiryPolicy(org.apache.ignite.internal.processors.cache.distributed.IgniteExternalizableExpiryPolicy) SERIALIZABLE(org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE) SortedSet(java.util.SortedSet) ObjectOutput(java.io.ObjectOutput) Transaction(org.apache.ignite.transactions.Transaction) IgniteEx(org.apache.ignite.internal.IgniteEx) REPEATABLE_READ(org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ) IgniteSystemProperties(org.apache.ignite.IgniteSystemProperties) DR_LOAD(org.apache.ignite.internal.processors.dr.GridDrType.DR_LOAD) ComputeJobResultPolicy(org.apache.ignite.compute.ComputeJobResultPolicy) X(org.apache.ignite.internal.util.typedef.X) OperationType(org.apache.ignite.internal.processors.performancestatistics.OperationType) GridPlainCallable(org.apache.ignite.internal.util.lang.GridPlainCallable) LoggerResource(org.apache.ignite.resources.LoggerResource) GridDhtTopologyFuture(org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTopologyFuture) CachePeekMode(org.apache.ignite.cache.CachePeekMode) IgniteOutClosure(org.apache.ignite.lang.IgniteOutClosure) IgniteThreadFactory(org.apache.ignite.thread.IgniteThreadFactory) Collection(java.util.Collection) IgniteException(org.apache.ignite.IgniteException) CacheEntry(org.apache.ignite.cache.CacheEntry) ReadRepairStrategy(org.apache.ignite.cache.ReadRepairStrategy) TransactionConfiguration(org.apache.ignite.configuration.TransactionConfiguration) IgniteClusterEx(org.apache.ignite.internal.cluster.IgniteClusterEx) OPTIMISTIC(org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC) OWNING(org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING) UUID(java.util.UUID) CI2(org.apache.ignite.internal.util.typedef.CI2) IgniteBiTuple(org.apache.ignite.lang.IgniteBiTuple) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) CacheMetricsMXBean(org.apache.ignite.mxbean.CacheMetricsMXBean) IgniteTxKey(org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey) CU(org.apache.ignite.internal.util.typedef.internal.CU) JobContextResource(org.apache.ignite.resources.JobContextResource) IGNITE_CACHE_RETRIES_COUNT(org.apache.ignite.IgniteSystemProperties.IGNITE_CACHE_RETRIES_COUNT) ObjectInput(java.io.ObjectInput) IgniteProductVersion(org.apache.ignite.lang.IgniteProductVersion) NotNull(org.jetbrains.annotations.NotNull) SortedMap(java.util.SortedMap) DataStreamerEntry(org.apache.ignite.internal.processors.datastreamer.DataStreamerEntry) NodeStoppingException(org.apache.ignite.internal.NodeStoppingException) DR_NONE(org.apache.ignite.internal.processors.dr.GridDrType.DR_NONE) ComputeTaskAdapter(org.apache.ignite.compute.ComputeTaskAdapter) AbstractSet(java.util.AbstractSet) GridCacheVersion(org.apache.ignite.internal.processors.cache.version.GridCacheVersion) HashMap(java.util.HashMap) ClusterTopologyException(org.apache.ignite.cluster.ClusterTopologyException) IgniteFeatures(org.apache.ignite.internal.IgniteFeatures) Function(java.util.function.Function) LT(org.apache.ignite.internal.util.typedef.internal.LT) CacheInterceptor(org.apache.ignite.cache.CacheInterceptor) IgniteCallable(org.apache.ignite.lang.IgniteCallable) HashSet(java.util.HashSet) GridCompoundReadRepairFuture(org.apache.ignite.internal.processors.cache.distributed.near.consistency.GridCompoundReadRepairFuture) IgniteClosure(org.apache.ignite.lang.IgniteClosure) IgnitePredicate(org.apache.ignite.lang.IgnitePredicate) GPC(org.apache.ignite.internal.util.typedef.internal.GPC) IgniteClusterNode(org.apache.ignite.internal.managers.discovery.IgniteClusterNode) NoSuchElementException(java.util.NoSuchElementException) ExecutorService(java.util.concurrent.ExecutorService) TC_SUBGRID(org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_SUBGRID) F(org.apache.ignite.internal.util.typedef.F) GridNearTxLocal(org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal) IgniteTxHeuristicCheckedException(org.apache.ignite.internal.transactions.IgniteTxHeuristicCheckedException) Iterator(java.util.Iterator) ReentrantLock(java.util.concurrent.locks.ReentrantLock) Semaphore(java.util.concurrent.Semaphore) AffinityTopologyVersion(org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion) ClusterTopologyCheckedException(org.apache.ignite.internal.cluster.ClusterTopologyCheckedException) GridCloseableIterator(org.apache.ignite.internal.util.lang.GridCloseableIterator) TimeUnit(java.util.concurrent.TimeUnit) GridEmbeddedFuture(org.apache.ignite.internal.util.future.GridEmbeddedFuture) IgniteTransactionsEx(org.apache.ignite.internal.IgniteTransactionsEx) ComputeJobAdapter(org.apache.ignite.compute.ComputeJobAdapter) CacheMetrics(org.apache.ignite.cache.CacheMetrics) GridPlainRunnable(org.apache.ignite.internal.util.lang.GridPlainRunnable) Collections(java.util.Collections) GridClosureException(org.apache.ignite.internal.util.lang.GridClosureException) TC_NO_FAILOVER(org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_NO_FAILOVER) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) IgniteInternalTx(org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx) GridFutureAdapter(org.apache.ignite.internal.util.future.GridFutureAdapter) GridNearTxLocal(org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal) IgniteConsistencyViolationException(org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException)

Example 2 with IgniteConsistencyViolationException

use of org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException in project ignite by apache.

the class GridCacheAdapter method syncOp.

/**
 * @param op Cache operation.
 * @param <T> Return type.
 * @return Operation result.
 * @throws IgniteCheckedException If operation failed.
 */
@SuppressWarnings({ "ErrorNotRethrown", "AssignmentToCatchBlockParameter" })
@Nullable
private <T> T syncOp(SyncOp<T> op) throws IgniteCheckedException {
    checkJta();
    awaitLastFut();
    GridNearTxLocal tx = checkCurrentTx();
    if (tx == null || tx.implicit()) {
        TransactionConfiguration tCfg = CU.transactionConfiguration(ctx, ctx.kernalContext().config());
        CacheOperationContext opCtx = ctx.operationContextPerCall();
        int retries = opCtx != null && opCtx.noRetries() ? 1 : MAX_RETRIES;
        for (int i = 0; i < retries; i++) {
            tx = ctx.tm().newTx(true, op.single(), ctx.systemTx() ? ctx : null, ctx.mvccEnabled() ? PESSIMISTIC : OPTIMISTIC, ctx.mvccEnabled() ? REPEATABLE_READ : READ_COMMITTED, tCfg.getDefaultTxTimeout(), !ctx.skipStore(), ctx.mvccEnabled(), 0, null, false);
            assert tx != null;
            try {
                T t = op.op(tx);
                assert tx.done() : "Transaction is not done: " + tx;
                return t;
            } catch (IgniteInterruptedCheckedException | IgniteTxHeuristicCheckedException | NodeStoppingException | IgniteConsistencyViolationException e) {
                throw e;
            } catch (IgniteCheckedException e) {
                if (!(e instanceof IgniteTxRollbackCheckedException)) {
                    try {
                        tx.rollback();
                        if (!(e instanceof TransactionCheckedException))
                            e = new IgniteTxRollbackCheckedException("Transaction has been rolled back: " + tx.xid(), e);
                    } catch (IgniteCheckedException | AssertionError | RuntimeException e1) {
                        U.error(log, "Failed to rollback transaction (cache may contain stale locks): " + CU.txString(tx), e1);
                        if (e != e1)
                            e.addSuppressed(e1);
                    }
                }
                if (X.hasCause(e, ClusterTopologyCheckedException.class) && i != retries - 1) {
                    ClusterTopologyCheckedException topErr = e.getCause(ClusterTopologyCheckedException.class);
                    if (!(topErr instanceof ClusterTopologyServerNotFoundException)) {
                        AffinityTopologyVersion topVer = tx.topologyVersion();
                        assert topVer != null && topVer.topologyVersion() > 0 : tx;
                        AffinityTopologyVersion awaitVer = new AffinityTopologyVersion(topVer.topologyVersion() + 1, 0);
                        ctx.shared().exchange().affinityReadyFuture(awaitVer).get();
                        continue;
                    }
                }
                throw e;
            } catch (RuntimeException e) {
                try {
                    tx.rollback();
                } catch (IgniteCheckedException | AssertionError | RuntimeException e1) {
                    U.error(log, "Failed to rollback transaction " + CU.txString(tx), e1);
                }
                throw e;
            } finally {
                ctx.tm().resetContext();
                if (ctx.isNear())
                    ctx.near().dht().context().tm().resetContext();
            }
        }
        // Should not happen.
        throw new IgniteCheckedException("Failed to perform cache operation (maximum number of retries exceeded).");
    } else
        return op.op(tx);
}
Also used : TransactionConfiguration(org.apache.ignite.configuration.TransactionConfiguration) NodeStoppingException(org.apache.ignite.internal.NodeStoppingException) AffinityTopologyVersion(org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion) GridNearTxLocal(org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal) IgniteTxRollbackCheckedException(org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException) IgniteTxHeuristicCheckedException(org.apache.ignite.internal.transactions.IgniteTxHeuristicCheckedException) IgniteInterruptedCheckedException(org.apache.ignite.internal.IgniteInterruptedCheckedException) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) BROADCAST(org.apache.ignite.internal.GridClosureCallMode.BROADCAST) IGNITE_CACHE_RETRIES_COUNT(org.apache.ignite.IgniteSystemProperties.IGNITE_CACHE_RETRIES_COUNT) LT(org.apache.ignite.internal.util.typedef.internal.LT) TransactionCheckedException(org.apache.ignite.internal.transactions.TransactionCheckedException) ClusterTopologyServerNotFoundException(org.apache.ignite.internal.cluster.ClusterTopologyServerNotFoundException) IgniteConsistencyViolationException(org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException) ClusterTopologyCheckedException(org.apache.ignite.internal.cluster.ClusterTopologyCheckedException) Nullable(org.jetbrains.annotations.Nullable)

Example 3 with IgniteConsistencyViolationException

use of org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException in project ignite by apache.

the class GridNearTxLocal method loadMissing.

/**
 * @param cacheCtx Cache context.
 * @param readThrough Read through flag.
 * @param async if {@code True}, then loading will happen in a separate thread.
 * @param keys Keys.
 * @param skipVals Skip values flag.
 * @param needVer If {@code true} version is required for loaded values.
 * @param c Closure to be applied for loaded values.
 * @param readRepairStrategy Read Repair strategy.
 * @param expiryPlc Expiry policy.
 * @return Future with {@code True} value if loading took place.
 */
private IgniteInternalFuture<Void> loadMissing(final GridCacheContext cacheCtx, AffinityTopologyVersion topVer, boolean readThrough, boolean async, final Collection<KeyCacheObject> keys, final boolean skipVals, final boolean needVer, boolean keepBinary, boolean recovery, ReadRepairStrategy readRepairStrategy, final ExpiryPolicy expiryPlc, final GridInClosure3<KeyCacheObject, Object, GridCacheVersion> c) {
    IgniteCacheExpiryPolicy expiryPlc0 = optimistic() ? accessPolicy(cacheCtx, keys) : cacheCtx.cache().expiryPolicy(expiryPlc);
    if (cacheCtx.isNear()) {
        return cacheCtx.nearTx().txLoadAsync(this, topVer, keys, readThrough, needVer || !cacheCtx.config().isReadFromBackup() || (optimistic() && serializable() && readThrough), /*deserializeBinary*/
        false, recovery, expiryPlc0, skipVals, needVer).chain(new C1<IgniteInternalFuture<Map<Object, Object>>, Void>() {

            @Override
            public Void apply(IgniteInternalFuture<Map<Object, Object>> f) {
                try {
                    Map<Object, Object> map = f.get();
                    processLoaded(map, keys, needVer, c);
                    return null;
                } catch (Exception e) {
                    setRollbackOnly();
                    throw new GridClosureException(e);
                }
            }
        });
    } else if (cacheCtx.isColocated()) {
        if (readRepairStrategy != null) {
            return new GridNearReadRepairCheckOnlyFuture(cacheCtx, keys, readRepairStrategy, readThrough, taskName, false, recovery, expiryPlc0, skipVals, needVer, true, this).multi().chain((fut) -> {
                try {
                    Map<Object, Object> map = fut.get();
                    processLoaded(map, keys, needVer, c);
                    return null;
                } catch (IgniteConsistencyViolationException e) {
                    for (KeyCacheObject key : keys) // Will be recreated after repair.
                    txState().removeEntry(cacheCtx.txKey(key));
                    throw new GridClosureException(e);
                } catch (Exception e) {
                    setRollbackOnly();
                    throw new GridClosureException(e);
                }
            });
        }
        if (keys.size() == 1) {
            final KeyCacheObject key = F.first(keys);
            return cacheCtx.colocated().loadAsync(key, readThrough, needVer || !cacheCtx.config().isReadFromBackup() || (optimistic() && serializable() && readThrough), topVer, resolveTaskName(), /*deserializeBinary*/
            false, expiryPlc0, skipVals, needVer, /*keepCacheObject*/
            true, recovery, null, label()).chain(new C1<IgniteInternalFuture<Object>, Void>() {

                @Override
                public Void apply(IgniteInternalFuture<Object> f) {
                    try {
                        Object val = f.get();
                        processLoaded(key, val, needVer, skipVals, c);
                        return null;
                    } catch (Exception e) {
                        setRollbackOnly();
                        throw new GridClosureException(e);
                    }
                }
            });
        } else {
            return cacheCtx.colocated().loadAsync(keys, readThrough, needVer || !cacheCtx.config().isReadFromBackup() || (optimistic() && serializable() && readThrough), topVer, resolveTaskName(), /*deserializeBinary*/
            false, recovery, expiryPlc0, skipVals, needVer, /*keepCacheObject*/
            true, label(), null).chain(new C1<IgniteInternalFuture<Map<Object, Object>>, Void>() {

                @Override
                public Void apply(IgniteInternalFuture<Map<Object, Object>> f) {
                    try {
                        Map<Object, Object> map = f.get();
                        processLoaded(map, keys, needVer, c);
                        return null;
                    } catch (Exception e) {
                        setRollbackOnly();
                        throw new GridClosureException(e);
                    }
                }
            });
        }
    } else {
        assert cacheCtx.isLocal();
        return localCacheLoadMissing(cacheCtx, topVer, readThrough, async, keys, skipVals, needVer, keepBinary, recovery, expiryPlc, c);
    }
}
Also used : GridClosureException(org.apache.ignite.internal.util.lang.GridClosureException) GridCacheMvccCandidate(org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate) IgniteTxRollbackCheckedException(org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException) GridFutureAdapter(org.apache.ignite.internal.util.future.GridFutureAdapter) GridFinishedFuture(org.apache.ignite.internal.util.future.GridFinishedFuture) GridDistributedTxMapping(org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxMapping) EVT_CACHE_OBJECT_READ(org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_READ) EntryProcessor(javax.cache.processor.EntryProcessor) Map(java.util.Map) Cache(javax.cache.Cache) IgniteCacheExpiryPolicy(org.apache.ignite.internal.processors.cache.IgniteCacheExpiryPolicy) DELETE(org.apache.ignite.internal.processors.cache.GridCacheOperation.DELETE) GridStringBuilder(org.apache.ignite.internal.util.GridStringBuilder) IgniteInClosure(org.apache.ignite.lang.IgniteInClosure) SER_READ_NOT_EMPTY_VER(org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry.SER_READ_NOT_EMPTY_VER) IgniteTxTimeoutCheckedException(org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException) GridToStringExclude(org.apache.ignite.internal.util.tostring.GridToStringExclude) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) MvccSnapshotFuture(org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshotFuture) MvccProcessor(org.apache.ignite.internal.processors.cache.mvcc.MvccProcessor) TransactionConcurrency(org.apache.ignite.transactions.TransactionConcurrency) Set(java.util.Set) GridCacheVersionedFuture(org.apache.ignite.internal.processors.cache.GridCacheVersionedFuture) GridDhtTxLocalAdapter(org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocalAdapter) MTC(org.apache.ignite.internal.processors.tracing.MTC) TransactionProxy(org.apache.ignite.internal.processors.cache.transactions.TransactionProxy) TX_NEAR_ENLIST_READ(org.apache.ignite.internal.processors.tracing.SpanType.TX_NEAR_ENLIST_READ) GridCacheContext(org.apache.ignite.internal.processors.cache.GridCacheContext) TransactionIsolation(org.apache.ignite.transactions.TransactionIsolation) EntryGetResult(org.apache.ignite.internal.processors.cache.EntryGetResult) GridDhtDetachedCacheEntry(org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtDetachedCacheEntry) U(org.apache.ignite.internal.util.typedef.internal.U) SecurityPermission(org.apache.ignite.plugin.security.SecurityPermission) GridNearReadRepairCheckOnlyFuture(org.apache.ignite.internal.processors.cache.distributed.near.consistency.GridNearReadRepairCheckOnlyFuture) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) COMMITTING(org.apache.ignite.transactions.TransactionState.COMMITTING) ClusterNode(org.apache.ignite.cluster.ClusterNode) CI1(org.apache.ignite.internal.util.typedef.CI1) IgniteInternalTx(org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) MvccUtils(org.apache.ignite.internal.processors.cache.mvcc.MvccUtils) S(org.apache.ignite.internal.util.typedef.internal.S) C2(org.apache.ignite.internal.util.typedef.C2) IgniteTxManager(org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager) C1(org.apache.ignite.internal.util.typedef.C1) PREPARED(org.apache.ignite.transactions.TransactionState.PREPARED) ExpiryPolicy(javax.cache.expiry.ExpiryPolicy) MvccCoordinator(org.apache.ignite.internal.processors.cache.mvcc.MvccCoordinator) IgniteTxOptimisticCheckedException(org.apache.ignite.internal.transactions.IgniteTxOptimisticCheckedException) COMMITTED(org.apache.ignite.transactions.TransactionState.COMMITTED) PREPARING(org.apache.ignite.transactions.TransactionState.PREPARING) IgniteTxEntry(org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry) GridNearReadRepairFuture(org.apache.ignite.internal.processors.cache.distributed.near.consistency.GridNearReadRepairFuture) AtomicLong(java.util.concurrent.atomic.AtomicLong) IgniteConsistencyViolationException(org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException) GridCacheSharedContext(org.apache.ignite.internal.processors.cache.GridCacheSharedContext) MvccSnapshot(org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot) CacheEntryPredicate(org.apache.ignite.internal.processors.cache.CacheEntryPredicate) GridDistributedCacheEntry(org.apache.ignite.internal.processors.cache.distributed.GridDistributedCacheEntry) GridCacheDrInfo(org.apache.ignite.internal.processors.cache.dr.GridCacheDrInfo) CX1(org.apache.ignite.internal.util.typedef.CX1) IgniteUuid(org.apache.ignite.lang.IgniteUuid) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) TRANSFORM(org.apache.ignite.internal.processors.cache.GridCacheOperation.TRANSFORM) GridInvokeValue(org.apache.ignite.internal.processors.cache.distributed.dht.GridInvokeValue) UNKNOWN(org.apache.ignite.transactions.TransactionState.UNKNOWN) TransactionProxyRollbackOnlyImpl(org.apache.ignite.internal.processors.cache.transactions.TransactionProxyRollbackOnlyImpl) CREATE(org.apache.ignite.internal.processors.cache.GridCacheOperation.CREATE) TX_NEAR_ENLIST_WRITE(org.apache.ignite.internal.processors.tracing.SpanType.TX_NEAR_ENLIST_WRITE) GridDhtTxPrepareFuture(org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture) GridInClosure3(org.apache.ignite.internal.util.lang.GridInClosure3) AtomicReferenceFieldUpdater(java.util.concurrent.atomic.AtomicReferenceFieldUpdater) Collection(java.util.Collection) ReadRepairStrategy(org.apache.ignite.cache.ReadRepairStrategy) UUID(java.util.UUID) CacheObject(org.apache.ignite.internal.processors.cache.CacheObject) TransactionProxyImpl(org.apache.ignite.internal.processors.cache.transactions.TransactionProxyImpl) Instant(java.time.Instant) GridCacheEntryRemovedException(org.apache.ignite.internal.processors.cache.GridCacheEntryRemovedException) CI2(org.apache.ignite.internal.util.typedef.CI2) GridCacheOperation(org.apache.ignite.internal.processors.cache.GridCacheOperation) IgniteBiTuple(org.apache.ignite.lang.IgniteBiTuple) Nullable(org.jetbrains.annotations.Nullable) NOOP(org.apache.ignite.internal.processors.cache.GridCacheOperation.NOOP) IgniteTxKey(org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey) CU(org.apache.ignite.internal.util.typedef.internal.CU) ACTIVE(org.apache.ignite.transactions.TransactionState.ACTIVE) KeyCacheObject(org.apache.ignite.internal.processors.cache.KeyCacheObject) GridDhtCacheEntry(org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry) ROLLING_BACK(org.apache.ignite.transactions.TransactionState.ROLLING_BACK) GridCacheEntryEx(org.apache.ignite.internal.processors.cache.GridCacheEntryEx) NodeStoppingException(org.apache.ignite.internal.NodeStoppingException) GridCacheReturn(org.apache.ignite.internal.processors.cache.GridCacheReturn) GridCacheVersion(org.apache.ignite.internal.processors.cache.version.GridCacheVersion) HashMap(java.util.HashMap) IgniteBiClosure(org.apache.ignite.lang.IgniteBiClosure) SER_READ_EMPTY_ENTRY_VER(org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry.SER_READ_EMPTY_ENTRY_VER) HashSet(java.util.HashSet) IgniteClosure(org.apache.ignite.lang.IgniteClosure) IgniteUtils(org.apache.ignite.internal.util.IgniteUtils) CacheException(javax.cache.CacheException) UpdateSourceIterator(org.apache.ignite.internal.processors.query.UpdateSourceIterator) GridLeanMap(org.apache.ignite.internal.util.GridLeanMap) F(org.apache.ignite.internal.util.typedef.F) Iterator(java.util.Iterator) GridTimeoutObject(org.apache.ignite.internal.processors.timeout.GridTimeoutObject) AffinityTopologyVersion(org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion) ClusterTopologyCheckedException(org.apache.ignite.internal.cluster.ClusterTopologyCheckedException) ROLLED_BACK(org.apache.ignite.transactions.TransactionState.ROLLED_BACK) UPDATE(org.apache.ignite.internal.processors.cache.GridCacheOperation.UPDATE) MARKED_ROLLBACK(org.apache.ignite.transactions.TransactionState.MARKED_ROLLBACK) MvccCoordinatorChangeAware(org.apache.ignite.internal.processors.cache.mvcc.MvccCoordinatorChangeAware) GridEmbeddedFuture(org.apache.ignite.internal.util.future.GridEmbeddedFuture) TransactionState(org.apache.ignite.transactions.TransactionState) GridDhtTxFinishFuture(org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxFinishFuture) CacheOperationContext(org.apache.ignite.internal.processors.cache.CacheOperationContext) EnlistOperation(org.apache.ignite.internal.processors.query.EnlistOperation) GridPlainRunnable(org.apache.ignite.internal.util.lang.GridPlainRunnable) Collections(java.util.Collections) GridClosureException(org.apache.ignite.internal.util.lang.GridClosureException) READ(org.apache.ignite.internal.processors.cache.GridCacheOperation.READ) TraceSurroundings(org.apache.ignite.internal.processors.tracing.MTC.TraceSurroundings) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) IgniteTxRollbackCheckedException(org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException) IgniteTxTimeoutCheckedException(org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) IgniteTxOptimisticCheckedException(org.apache.ignite.internal.transactions.IgniteTxOptimisticCheckedException) IgniteConsistencyViolationException(org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException) GridCacheEntryRemovedException(org.apache.ignite.internal.processors.cache.GridCacheEntryRemovedException) NodeStoppingException(org.apache.ignite.internal.NodeStoppingException) CacheException(javax.cache.CacheException) ClusterTopologyCheckedException(org.apache.ignite.internal.cluster.ClusterTopologyCheckedException) GridClosureException(org.apache.ignite.internal.util.lang.GridClosureException) C1(org.apache.ignite.internal.util.typedef.C1) GridNearReadRepairCheckOnlyFuture(org.apache.ignite.internal.processors.cache.distributed.near.consistency.GridNearReadRepairCheckOnlyFuture) CacheObject(org.apache.ignite.internal.processors.cache.CacheObject) KeyCacheObject(org.apache.ignite.internal.processors.cache.KeyCacheObject) GridTimeoutObject(org.apache.ignite.internal.processors.timeout.GridTimeoutObject) IgniteConsistencyViolationException(org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException) Map(java.util.Map) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap) GridLeanMap(org.apache.ignite.internal.util.GridLeanMap) IgniteCacheExpiryPolicy(org.apache.ignite.internal.processors.cache.IgniteCacheExpiryPolicy) KeyCacheObject(org.apache.ignite.internal.processors.cache.KeyCacheObject)

Example 4 with IgniteConsistencyViolationException

use of org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException in project ignite by apache.

the class GridCacheAdapter method asyncOp.

/**
 * @param tx Transaction.
 * @param op Cache operation.
 * @param opCtx Cache operation context.
 * @param <T> Return type.
 * @return Future.
 */
@SuppressWarnings("unchecked")
protected <T> IgniteInternalFuture<T> asyncOp(GridNearTxLocal tx, final AsyncOp<T> op, final CacheOperationContext opCtx, final boolean retry) {
    IgniteInternalFuture<T> fail = asyncOpAcquire(retry);
    if (fail != null)
        return fail;
    FutureHolder holder = lastFut.get();
    holder.lock();
    try {
        IgniteInternalFuture fut = holder.future();
        final GridNearTxLocal tx0 = tx;
        final CX1 clo = new CX1<IgniteInternalFuture<T>, T>() {

            @Override
            public T applyx(IgniteInternalFuture<T> tFut) throws IgniteCheckedException {
                try {
                    return tFut.get();
                } catch (IgniteTxTimeoutCheckedException | IgniteTxRollbackCheckedException | NodeStoppingException | IgniteConsistencyViolationException e) {
                    throw e;
                } catch (IgniteCheckedException e1) {
                    try {
                        tx0.rollbackNearTxLocalAsync();
                    } catch (Throwable e2) {
                        if (e1 != e2)
                            e1.addSuppressed(e2);
                    }
                    throw e1;
                } finally {
                    ctx.shared().txContextReset();
                }
            }
        };
        if (fut != null && !fut.isDone()) {
            IgniteInternalFuture<T> f = new GridEmbeddedFuture(fut, (IgniteOutClosure<IgniteInternalFuture>) () -> {
                GridFutureAdapter resFut = new GridFutureAdapter();
                ctx.kernalContext().closure().runLocalSafe((GridPlainRunnable) () -> {
                    IgniteInternalFuture fut0;
                    if (ctx.kernalContext().isStopping())
                        fut0 = new GridFinishedFuture<>(new IgniteCheckedException("Operation has been cancelled (node or cache is stopping)."));
                    else if (ctx.gate().isStopped())
                        fut0 = new GridFinishedFuture<>(new CacheStoppedException(ctx.name()));
                    else {
                        ctx.operationContextPerCall(opCtx);
                        ctx.shared().txContextReset();
                        try {
                            fut0 = op.op(tx0).chain(clo);
                        } finally {
                            // It is necessary to clear tx context in this thread as well.
                            ctx.shared().txContextReset();
                            ctx.operationContextPerCall(null);
                        }
                    }
                    fut0.listen((IgniteInClosure<IgniteInternalFuture>) fut01 -> {
                        try {
                            resFut.onDone(fut01.get());
                        } catch (Throwable ex) {
                            resFut.onDone(ex);
                        }
                    });
                }, true);
                return resFut;
            });
            saveFuture(holder, f, retry);
            return f;
        }
        /**
         * Wait for concurrent tx operation to finish.
         * See {@link GridDhtTxLocalAdapter#updateLockFuture(IgniteInternalFuture, IgniteInternalFuture)}
         */
        if (!tx0.txState().implicitSingle())
            tx0.txState().awaitLastFuture(ctx.shared());
        IgniteInternalFuture<T> f;
        try {
            f = op.op(tx).chain(clo);
        } finally {
            // It is necessary to clear tx context in this thread as well.
            ctx.shared().txContextReset();
        }
        saveFuture(holder, f, retry);
        if (tx.implicit())
            ctx.tm().resetContext();
        return f;
    } finally {
        holder.unlock();
    }
}
Also used : IgnitionEx(org.apache.ignite.internal.IgnitionEx) IgniteTxRollbackCheckedException(org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException) GridFutureAdapter(org.apache.ignite.internal.util.future.GridFutureAdapter) GridFinishedFuture(org.apache.ignite.internal.util.future.GridFinishedFuture) IgniteTxLocalAdapter(org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter) EntryProcessor(javax.cache.processor.EntryProcessor) GridSerializableMap(org.apache.ignite.internal.util.GridSerializableMap) MetricUtils.cacheMetricsRegistryName(org.apache.ignite.internal.processors.metric.impl.MetricUtils.cacheMetricsRegistryName) Map(java.util.Map) Cache(javax.cache.Cache) InvalidObjectException(java.io.InvalidObjectException) DFLT_ALLOW_ATOMIC_OPS_IN_TX(org.apache.ignite.internal.processors.cache.CacheOperationContext.DFLT_ALLOW_ATOMIC_OPS_IN_TX) ClusterGroup(org.apache.ignite.cluster.ClusterGroup) IgniteKernal(org.apache.ignite.internal.IgniteKernal) TC_NO_FAILOVER(org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_NO_FAILOVER) ComputeJobContext(org.apache.ignite.compute.ComputeJobContext) IgniteInClosure(org.apache.ignite.lang.IgniteInClosure) Externalizable(java.io.Externalizable) IgniteTxTimeoutCheckedException(org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException) GridToStringExclude(org.apache.ignite.internal.util.tostring.GridToStringExclude) CIX2(org.apache.ignite.internal.util.typedef.CIX2) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) CIX3(org.apache.ignite.internal.util.typedef.CIX3) TransactionConcurrency(org.apache.ignite.transactions.TransactionConcurrency) Set(java.util.Set) IgniteRunnable(org.apache.ignite.lang.IgniteRunnable) IgniteInstanceResource(org.apache.ignite.resources.IgniteInstanceResource) READ_COMMITTED(org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED) ComputeTaskInternalFuture(org.apache.ignite.internal.ComputeTaskInternalFuture) CacheDataRow(org.apache.ignite.internal.processors.cache.persistence.CacheDataRow) Executors(java.util.concurrent.Executors) IgniteCache(org.apache.ignite.IgniteCache) GridCacheAffinityImpl(org.apache.ignite.internal.processors.cache.affinity.GridCacheAffinityImpl) GridCacheRawVersionedEntry(org.apache.ignite.internal.processors.cache.version.GridCacheRawVersionedEntry) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) GridDhtPartitionTopology(org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionTopology) PESSIMISTIC(org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC) PlatformCacheEntryFilter(org.apache.ignite.internal.processors.platform.cache.PlatformCacheEntryFilter) TransactionIsolation(org.apache.ignite.transactions.TransactionIsolation) IgniteBiPredicate(org.apache.ignite.lang.IgniteBiPredicate) ComputeJob(org.apache.ignite.compute.ComputeJob) EntryProcessorResult(javax.cache.processor.EntryProcessorResult) Affinity(org.apache.ignite.cache.affinity.Affinity) IgniteTxLocalEx(org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalEx) U(org.apache.ignite.internal.util.typedef.internal.U) Callable(java.util.concurrent.Callable) IgniteLogger(org.apache.ignite.IgniteLogger) IgniteDrDataStreamerCacheUpdater(org.apache.ignite.internal.processors.dr.IgniteDrDataStreamerCacheUpdater) SecurityPermission(org.apache.ignite.plugin.security.SecurityPermission) Supplier(java.util.function.Supplier) EntryProcessorException(javax.cache.processor.EntryProcessorException) ArrayList(java.util.ArrayList) ClusterNode(org.apache.ignite.cluster.ClusterNode) CI1(org.apache.ignite.internal.util.typedef.CI1) ComputeJobResult(org.apache.ignite.compute.ComputeJobResult) IgniteInternalTx(org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx) MvccUtils(org.apache.ignite.internal.processors.cache.mvcc.MvccUtils) S(org.apache.ignite.internal.util.typedef.internal.S) IgniteInterruptedCheckedException(org.apache.ignite.internal.IgniteInterruptedCheckedException) ClusterTopologyServerNotFoundException(org.apache.ignite.internal.cluster.ClusterTopologyServerNotFoundException) GridInternal(org.apache.ignite.internal.processors.task.GridInternal) C2(org.apache.ignite.internal.util.typedef.C2) C1(org.apache.ignite.internal.util.typedef.C1) ExpiryPolicy(javax.cache.expiry.ExpiryPolicy) A(org.apache.ignite.internal.util.typedef.internal.A) IOException(java.io.IOException) Ignite(org.apache.ignite.Ignite) GridDhtInvalidPartitionException(org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtInvalidPartitionException) DataStreamerImpl(org.apache.ignite.internal.processors.datastreamer.DataStreamerImpl) T2(org.apache.ignite.internal.util.typedef.T2) ObjectStreamException(java.io.ObjectStreamException) GridDhtCacheAdapter(org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter) GridDhtLocalPartition(org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition) IgniteConsistencyViolationException(org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException) TransactionCheckedException(org.apache.ignite.internal.transactions.TransactionCheckedException) MvccSnapshot(org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot) BROADCAST(org.apache.ignite.internal.GridClosureCallMode.BROADCAST) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) GridCacheDrInfo(org.apache.ignite.internal.processors.cache.dr.GridCacheDrInfo) CX1(org.apache.ignite.internal.util.typedef.CX1) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) IgniteExternalizableExpiryPolicy(org.apache.ignite.internal.processors.cache.distributed.IgniteExternalizableExpiryPolicy) SERIALIZABLE(org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE) SortedSet(java.util.SortedSet) ObjectOutput(java.io.ObjectOutput) Transaction(org.apache.ignite.transactions.Transaction) IgniteEx(org.apache.ignite.internal.IgniteEx) REPEATABLE_READ(org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ) IgniteSystemProperties(org.apache.ignite.IgniteSystemProperties) DR_LOAD(org.apache.ignite.internal.processors.dr.GridDrType.DR_LOAD) ComputeJobResultPolicy(org.apache.ignite.compute.ComputeJobResultPolicy) X(org.apache.ignite.internal.util.typedef.X) OperationType(org.apache.ignite.internal.processors.performancestatistics.OperationType) GridPlainCallable(org.apache.ignite.internal.util.lang.GridPlainCallable) LoggerResource(org.apache.ignite.resources.LoggerResource) GridDhtTopologyFuture(org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTopologyFuture) CachePeekMode(org.apache.ignite.cache.CachePeekMode) IgniteOutClosure(org.apache.ignite.lang.IgniteOutClosure) IgniteThreadFactory(org.apache.ignite.thread.IgniteThreadFactory) Collection(java.util.Collection) IgniteException(org.apache.ignite.IgniteException) CacheEntry(org.apache.ignite.cache.CacheEntry) ReadRepairStrategy(org.apache.ignite.cache.ReadRepairStrategy) TransactionConfiguration(org.apache.ignite.configuration.TransactionConfiguration) IgniteClusterEx(org.apache.ignite.internal.cluster.IgniteClusterEx) OPTIMISTIC(org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC) OWNING(org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING) UUID(java.util.UUID) CI2(org.apache.ignite.internal.util.typedef.CI2) IgniteBiTuple(org.apache.ignite.lang.IgniteBiTuple) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) CacheMetricsMXBean(org.apache.ignite.mxbean.CacheMetricsMXBean) IgniteTxKey(org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey) CU(org.apache.ignite.internal.util.typedef.internal.CU) JobContextResource(org.apache.ignite.resources.JobContextResource) IGNITE_CACHE_RETRIES_COUNT(org.apache.ignite.IgniteSystemProperties.IGNITE_CACHE_RETRIES_COUNT) ObjectInput(java.io.ObjectInput) IgniteProductVersion(org.apache.ignite.lang.IgniteProductVersion) NotNull(org.jetbrains.annotations.NotNull) SortedMap(java.util.SortedMap) DataStreamerEntry(org.apache.ignite.internal.processors.datastreamer.DataStreamerEntry) NodeStoppingException(org.apache.ignite.internal.NodeStoppingException) DR_NONE(org.apache.ignite.internal.processors.dr.GridDrType.DR_NONE) ComputeTaskAdapter(org.apache.ignite.compute.ComputeTaskAdapter) AbstractSet(java.util.AbstractSet) GridCacheVersion(org.apache.ignite.internal.processors.cache.version.GridCacheVersion) HashMap(java.util.HashMap) ClusterTopologyException(org.apache.ignite.cluster.ClusterTopologyException) IgniteFeatures(org.apache.ignite.internal.IgniteFeatures) Function(java.util.function.Function) LT(org.apache.ignite.internal.util.typedef.internal.LT) CacheInterceptor(org.apache.ignite.cache.CacheInterceptor) IgniteCallable(org.apache.ignite.lang.IgniteCallable) HashSet(java.util.HashSet) GridCompoundReadRepairFuture(org.apache.ignite.internal.processors.cache.distributed.near.consistency.GridCompoundReadRepairFuture) IgniteClosure(org.apache.ignite.lang.IgniteClosure) IgnitePredicate(org.apache.ignite.lang.IgnitePredicate) GPC(org.apache.ignite.internal.util.typedef.internal.GPC) IgniteClusterNode(org.apache.ignite.internal.managers.discovery.IgniteClusterNode) NoSuchElementException(java.util.NoSuchElementException) ExecutorService(java.util.concurrent.ExecutorService) TC_SUBGRID(org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_SUBGRID) F(org.apache.ignite.internal.util.typedef.F) GridNearTxLocal(org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal) IgniteTxHeuristicCheckedException(org.apache.ignite.internal.transactions.IgniteTxHeuristicCheckedException) Iterator(java.util.Iterator) ReentrantLock(java.util.concurrent.locks.ReentrantLock) Semaphore(java.util.concurrent.Semaphore) AffinityTopologyVersion(org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion) ClusterTopologyCheckedException(org.apache.ignite.internal.cluster.ClusterTopologyCheckedException) GridCloseableIterator(org.apache.ignite.internal.util.lang.GridCloseableIterator) TimeUnit(java.util.concurrent.TimeUnit) GridEmbeddedFuture(org.apache.ignite.internal.util.future.GridEmbeddedFuture) IgniteTransactionsEx(org.apache.ignite.internal.IgniteTransactionsEx) ComputeJobAdapter(org.apache.ignite.compute.ComputeJobAdapter) CacheMetrics(org.apache.ignite.cache.CacheMetrics) GridPlainRunnable(org.apache.ignite.internal.util.lang.GridPlainRunnable) Collections(java.util.Collections) GridClosureException(org.apache.ignite.internal.util.lang.GridClosureException) NodeStoppingException(org.apache.ignite.internal.NodeStoppingException) GridNearTxLocal(org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal) IgniteTxRollbackCheckedException(org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) GridPlainRunnable(org.apache.ignite.internal.util.lang.GridPlainRunnable) GridEmbeddedFuture(org.apache.ignite.internal.util.future.GridEmbeddedFuture) GridFinishedFuture(org.apache.ignite.internal.util.future.GridFinishedFuture) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) BROADCAST(org.apache.ignite.internal.GridClosureCallMode.BROADCAST) IGNITE_CACHE_RETRIES_COUNT(org.apache.ignite.IgniteSystemProperties.IGNITE_CACHE_RETRIES_COUNT) LT(org.apache.ignite.internal.util.typedef.internal.LT) GridFutureAdapter(org.apache.ignite.internal.util.future.GridFutureAdapter) IgniteConsistencyViolationException(org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException) IgniteTxTimeoutCheckedException(org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException) CX1(org.apache.ignite.internal.util.typedef.CX1)

Aggregations

IgniteCheckedException (org.apache.ignite.IgniteCheckedException)4 ArrayList (java.util.ArrayList)3 Collection (java.util.Collection)3 Collections (java.util.Collections)3 HashMap (java.util.HashMap)3 HashSet (java.util.HashSet)3 Iterator (java.util.Iterator)3 Map (java.util.Map)3 Set (java.util.Set)3 UUID (java.util.UUID)3 Cache (javax.cache.Cache)3 ExpiryPolicy (javax.cache.expiry.ExpiryPolicy)3 EntryProcessor (javax.cache.processor.EntryProcessor)3 IGNITE_CACHE_RETRIES_COUNT (org.apache.ignite.IgniteSystemProperties.IGNITE_CACHE_RETRIES_COUNT)3 NodeStoppingException (org.apache.ignite.internal.NodeStoppingException)3 ClusterTopologyCheckedException (org.apache.ignite.internal.cluster.ClusterTopologyCheckedException)3 AffinityTopologyVersion (org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion)3 IgniteConsistencyViolationException (org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException)3 IgniteTxRollbackCheckedException (org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException)3 Nullable (org.jetbrains.annotations.Nullable)3