You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Muthu <mu...@gmail.com> on 2017/08/04 01:48:34 UTC

Explicit setting of write synchronization mode FULL_SYNC needed for replicated caches?

Hi Folks,

I understand from the docs (https://apacheignite.readme.io/docs/cache-modes)
that replicated caches are implemented using partitioned caches where every
key has a primary copy and is also backed up on all other nodes in the
cluster & that when data is queried lookups would be made from both primary
& backup on the node for serving the query.

But i see that the default cache write synchronization mode is
PRIMARY_SYNC, where client will not wait for backups to be updated. Does
that mean i have to explicitly set it to FULL_SYNC for replicated caches
since responses rely on lookup of primary & backup?

Regards,
Muthu

-- The real danger with modern technology isn't that machines will begin to
think like people, but that people will begin to think like machines.
-- Faith is to believe what you do not see; the reward of this faith is to
see what you believe.

Re: Explicit setting of write synchronization mode FULL_SYNC needed for replicated caches?

Posted by Andrey Gura <ag...@apache.org>.
Hi Muthu,

You understand correctly. If you have write-then-read logic that can
be executed on backup node for particular key than you should use
FULL_SYNC write synchronization mode.

Other way to get similar behaviour is setting readFromBackup property
value to false. In this case you still can use PRIMARY_SYNC
synchronization mode. But you should understand what consistency
guarantee you have in case of node failure.

On Fri, Aug 4, 2017 at 4:48 AM, Muthu <mu...@gmail.com> wrote:
> Hi Folks,
>
> I understand from the docs (https://apacheignite.readme.io/docs/cache-modes)
> that replicated caches are implemented using partitioned caches where every
> key has a primary copy and is also backed up on all other nodes in the
> cluster & that when data is queried lookups would be made from both primary
> & backup on the node for serving the query.
>
> But i see that the default cache write synchronization mode is PRIMARY_SYNC,
> where client will not wait for backups to be updated. Does that mean i have
> to explicitly set it to FULL_SYNC for replicated caches since responses rely
> on lookup of primary & backup?
>
> Regards,
> Muthu
>
> -- The real danger with modern technology isn't that machines will begin to
> think like people, but that people will begin to think like machines.
> -- Faith is to believe what you do not see; the reward of this faith is to
> see what you believe.