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

ぃ、小莉子 提交于 2019-12-11 15:15:42

问题


I understand from the docs 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?


回答1:


The first option is to use 'FULL_SYNC' mode. In that case, client request will wait for write to complete on all participating nodes (primaries and backups).

The second option, that can be used here, is to use 'PRIMARY_SYNC' and set 'CacheConfiguration#readFromBackup' flag to false (which is true by default). Ignite will send the request to primary node and get the value from there.

Please see https://ignite.apache.org/releases/mobile/org/apache/ignite/configuration/CacheConfiguration.html

By the way, both options make sense for partitioned cache as well.



来源:https://stackoverflow.com/questions/45497095/explicit-setting-of-write-synchronization-mode-full-sync-needed-for-replicated-c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!