ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkulichenko <valentin.kuliche...@gmail.com>
Subject Re: Persistent CacheStore and backups.
Date Tue, 06 Oct 2015 00:42:49 GMT
mfronczyk wrote
> Can I make transaction writes to the persistence store atomic with
> write-behind? As you wrote, writes always happen on the primary node when
> write-behind is enabled. This means that if there were multiple keys
> modified in a single transaction and these keys belong to different
> primary nodes, the persistent store might get into an inconsistent state
> if any of the nodes fails to persist the change. Is that true?

Yes, this is true. Write-behind updates are asynchronous and are never
enlisted in the transaction. So even if all of them happen on one node,
there is a chance to have data inconsistency between cache and database (but
not within the cache). If you want to have database to be always consistent
with the cache, you will have to use write-through and therefore update DB

mfronczyk wrote
> My dataset is relatively small, about 16GB, so I can easily hold it in a
> single machine's RAM. I want to have a cluster of 2 nodes - master and
> slave for data safety and write-behind for performance. I require data
> consistency more than availability.  I'm wondering if it's possible to
> configure Ignite to treat one node as the primary node for all map entries
> and the 2nd one for backups. Then only one node will be writing to the
> persistent store with write-behind enabled, so it'll always remain
> consistent. I was hoping that REPLICATED mode allows that, but it seems
> that it'll still distribute the entries over the 2 nodes. Do you have any
> ideas?

What you're describing is actually a single-partition cache and you can
achieve this configuring affinity like this:

<property name="affinity">
        <property name="partitions" value="1"/>

But again, this does not guarantee transactional consistency between cache
and DB in case of write-behind, so I don't see any benefits in this


View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Persistent-CacheStore-and-backups-tp1368p1556.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message