You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by serdar severcan <ss...@gmail.com> on 2018/03/17 11:41:17 UTC

could not load all records into partitioned cache when server node count increased

I have asked a question on stackoverflow.com.
https://stackoverflow.com/questions/49145540/why-ignite-does-not-load-all-records-into-cache-when-server-node-count-increased/49155857?noredirect=1#comment85629822_49155857

@Dmitriy asked for a reproducer example. I had supplied an example on
github. Below link for this.

https://github.com/serdroid/userinfo

thank you for your help.
serdar

Re: could not load all records into partitioned cache when server node count increased

Posted by serdar severcan <ss...@gmail.com>.
Hello,
I've tried in sample project and worked as expected. In my original case I
had updated records in database using arbitrary partition ids. I had
misunderstood. I should have updated records according to affinity function.
Thank you
Regards,
Serdar

On 20 March 2018 at 16:57, slava.koptilin <sl...@gmail.com> wrote:

> Hello serdar,
>
> Well, I just checked your project and it seems I found the root cause of
> that behavior.
> UserInfoGenerator uses wrong logic in order to generate the partitionId.
> The partitionId must be equal the value that is returned by corresponding
> affinity function, i.e.
>
>     partitionId =
> ignite.affinity(UserInfo.class.getName()).partition(iserInfo.getUserid())
>
> Best regards,
> Slava.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: could not load all records into partitioned cache when server node count increased

Posted by "slava.koptilin" <sl...@gmail.com>.
Hello serdar,

Well, I just checked your project and it seems I found the root cause of
that behavior.
UserInfoGenerator uses wrong logic in order to generate the partitionId.
The partitionId must be equal the value that is returned by corresponding
affinity function, i.e.

    partitionId =
ignite.affinity(UserInfo.class.getName()).partition(iserInfo.getUserid())

Best regards,
Slava.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/