Search code examples
elasticsearchignitejcache

Does Custom CacheStore for Ignite automatically do write-behind?


I have implemented a Custom CacheStore for Ignite to communicate with Elastic Search. Now, if ElasticSearch server is down for some time, will the data in the cache be uploaded to Elastic Search once the ES server is up?


Solution

  • Does Custom CacheStore for Ignite automatically do write-behind?

    No. It is disabled by default: https://apacheignite.readme.io/docs/3rd-party-store#section-configuration

    setWriteBehindEnabled(boolean) | Sets flag indicating whether write-behind is enabled. | false
    

    Now, if ElasticSearch server is down for some time, will the data in the cache be uploaded to Elastic Search once the ES server is up?

    No. Ignite will not send that data again. It is also specified in documentation:

    Performance vs. Consistency
    Enabling write-behind caching increases performance by performing 
    asynchronous updates, but this can lead to a potential drop in consistency as 
    some updates could be lost due to node failures or crashes.