Ankit,
I checked sequence and atomic on Ignite 2.6 with the following code:
try (Ignite ignite = Ignition.start("example-persistent-store.xml")) {
ignite.active(true);
IgniteAtomicSequence seq = ignite.atomicSequence("sequence", 0, true);
IgniteAtomicLong atomic = ignite.atomicLong("long", 0, true);
for (int i = 0; i < 100; i++) {
seq.incrementAndGet();
atomic.incrementAndGet();
}
}
try (Ignite ignite = Ignition.start("example-persistent-store.xml")) {
ignite.active(true);
IgniteAtomicSequence seq = ignite.atomicSequence("sequence", 0, true);
IgniteAtomicLong atomic = ignite.atomicLong("long", 0, true);
assert seq.get() == 1000 : seq.get();
assert atomic.get() == 100 : atomic.get();
}
Code works fine with enabled assertions (-ea) and cleaned persistence
directory. We have sequence value = 1000, atomic value = 100 after
node restart.
Could you tell us in more detail how you use "Ignite ID generator"?
чт, 27 сент. 2018 г. в 16:27, abatra <[email protected]>:
>
> Hi Anton,
>
> With persistence enabled, if I reboot the nodes in the cluster, ID generator
> starts generating ID from 1 after the nodes are back up. My expectation is
> that that the latest generated ID(s) will be persisted across cluster reboot
> and the ID generator will start from the latest persisted ID.
>
> I am using the latest version of Ignite i.e. 2.6.0.
>
> -Ankit
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/