You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Andrey Mashenkov <an...@gmail.com> on 2017/11/30 09:41:29 UTC

Replicated with CacheStore and Read-Through works like Partitioned with no backups.

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

Re: Replicated with CacheStore and Read-Through works like Partitioned with no backups.

Posted by Dmitriy Setrakyan <ds...@apache.org>.
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.mashenkov@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
>