It sounds like a bug, get() from backup should update the local map.
Andrey, please feel free to file a ticket.
On Thu, Nov 30, 2017 at 1:41 AM, Andrey Mashenkov <
andrey.mashen...@gmail.com> wrote:
> Hi Igniters,
>
> Ignite Replicated cache with CacheStore and Read-through=true and
> ReadFromBackup=true works in unexpected way from user perspective.
>
> Imagine a case user have a large dataset in underlying db and want to cache
> hot data only, so there is no need to do cache.loadCache().
>
> User expectation is when he get an entry from Ignite, Ignite go to the
> CacheStore and saves entry locally (as readthrough=true) and
> subsequent get() of same entry will return result from local map.
>
> For now it is true if user call get() on primary node.
> But it works different and unexpected way on backup, where every get
> operation will go to the primary node regardless of ReadFromBackup=true and
> Read-through=true.
>
> So, ReplicatedCache in that case works like Partitioned with no backups.
>
> Of course, I understand it will be more weird behavior if get() operation
> will cause cluster wide operation for update backups when read-through
> happened.
> But why get() from backup doesn't update local cache map once entry from
> primary requested?
>
> Can we fix this or have some additional mode to workaround this issue?
> Thoughts?
>
> --
> Best regards,
> Andrey V. Mashenkov
>