Let's move the discussion to a single thread: http://apache-ignite-users.70518.x6.nabble.com/Get-by-key-only-working-on-net-for-certain-long-literal-values-td13456.html
On Wed, Jun 7, 2017 at 6:21 AM, Gordon Reid (Nine Mile) < [email protected]> wrote: > Hi There, > > > > I am able to load the same row into my cache from my persistent store > twice, and have it present in my cache twice. It seems the id hash is > different for the key. > > > > The key class is very simple, just one int id. > > > > And here is what I see debugging. How can the id hash be different here.?? > > > > > > > > Note that there are a few steps to get into this weird state. > > > > Start java server. Key 953 is loaded. There is only one instance as > expected. Read through = true > > Now start .NET client and call Cache.Get(new SecurityKey(){Id=953}). For > some reason it is not found in the java cache, and read through is invoked > on the java side. > > Now we have two SecurityKey in the cache, both with id=953, but with > different id hash. > > > > What could possibly be happening here? > > Thanks, > > Gordon. > > > > The Key class just looks like this. > > > > public class SecurityKey implements CacheKey { > > private int id; > > public SecurityKey() { > // No-op. > } > > > public SecurityKey(int id) { > this.id = id; > } > > public int getId() { > return id; > } > > @Override > public void setId(int id) { > this.id = id; > } > > > > */** {@inheritDoc} */ *@Override public String toString() { > return "SecurityKey [id=" + id + > "]"; > } > } > > > > > > > > This email and any attachments are proprietary & confidential and are > intended solely for the use of the individuals to whom it is addressed. Any > views or opinions expressed are solely for those of the author and do not > necessarily reflect those of Nine Mile Financial Pty. Limited. If you have > received this email in error, please let us know immediately by reply email > and delete from your system. Nine Mile Financial Pty. Limited. ABN: 346 > 1349 0252 >
