Search code examples
atomicignite

Are atomics in Ignite consistent in case of nodes shutdown?


I wonder if atomic types consistent in case of nodes shut down. For example, I have an Ignite cluster of three nodes with atomics configured in this way:

<property name="atomicConfiguration">
    <bean class="org.apache.ignite.configuration.AtomicConfiguration">
        <property name="backups" value="2"/>
        <property name="atomicSequenceReserveSize" value="5000"/>
    </bean>
</property>

Would I get a correct value of AtomicLong if two of three nodes were shutdown?


Solution

  • Yes, you'll get a correct value because you've configured 2 backups. Atomic internally uses PARTITIONED cache template (it could be reconfigured by the way), it means that the cache has one primary partition and a configured number of backup partitions, let's call it backupNumber. In general Atomic survives after a loss of backupNumber nodes.