Search Results for

    Show / Hide Table of Contents

    Enum CacheAtomicityMode

    Cache atomicity mode.

    Namespace: Apache.Ignite.Core.Cache.Configuration
    Assembly: Apache.Ignite.Core.dll
    Syntax
    public enum CacheAtomicityMode : int

    Fields

    Name Description
    Atomic

    Specifies atomic-only cache behaviour. In this mode distributed transactions and distributed locking are not supported. Disabling transactions and locking allows to achieve much higher performance and throughput ratios.

    In addition to transactions and locking, one of the main differences to Atomic mode is that bulk writes, such as PutAll(IEnumerable<KeyValuePair<TK, TV>>) and methods, become simple batch operations which can partially fail. In case of partial failure, CachePartialUpdateExceptionwill be thrown which will contain a list of keys for which the update failed. It is recommended that bulk writes are used whenever multiple keys need to be inserted or updated in cache, as they reduce number of network trips and provide better performance.

    Note that even without locking and transactions, Atomic mode still provides full consistency guarantees across all cache nodes.

    Also note that all data modifications in Atomic mode are guaranteed to be atomic and consistent with writes to the underlying persistent store, if one is configured.

    Transactional

    Specifies fully ACID-compliant transactional cache behavior.

    Note! In this mode, transactional consistency is guaranteed for key-value API operations only. To enable ACID capabilities for SQL transactions, use TRANSACTIONAL_SNAPSHOT mode.

    Note! This atomicity mode is not compatible with the other atomicity modes within the same transaction. If a transaction is executed over multiple caches, all caches must have the same atomicity mode, either TRANSACTIONAL_SNAPSHOT or TRANSACTIONAL.

    TransactionalSnapshot

    This is an experimental feature. Transactional SQL is currently in a beta status.

    Specifies fully ACID-compliant transactional cache behavior for both key-value API and SQL transactions.

    This atomicity mode enables multiversion concurrency control (MVCC) for the cache. In MVCC-enabled caches, when a transaction updates a row, it creates a new version of that row instead of overwriting it. Other users continue to see the old version of the row until the transaction is committed. In this way, readers and writers do not conflict with each other and always work with a consistent dataset. The old version of data is cleaned up when it's no longer accessed by anyone.

    With this mode enabled, one node is elected as an MVCC coordinator. This node tracks all in-flight transactions and queries executed in the cluster. Each transaction or query executed over the cache with TRANSACTIONAL_SNAPSHOT mode works with a current snapshot of data generated for this transaction or query by the coordinator. This snapshot ensures that the transaction works with a consistent database state during its execution period.

    Note! This atomicity mode is not compatible with the other atomicity modes within the same transaction. If a transaction is executed over multiple caches, all caches must have the same atomicity mode, either TRANSACTIONAL_SNAPSHOT or TRANSACTIONAL.

    In This Article
    Back to top © 2015 - 2019 The Apache Software Foundation