ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gordon Reid (Nine Mile)" <gordon.r...@ninemilefinancial.com>
Subject UPDATED: BinaryIdentityResolver is gone in 2.0 but default seems to have a problem
Date Wed, 07 Jun 2017 03:23:30 GMT
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.??

[cid:image001.png@01D2DF91.3E536370]

[cid:image002.png@01D2DF91.3E536370]

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 +
            "]";
    }
}


.NET class looks like this

    public class SecurityKey : IKey
    {
        public int Id { get; set; }


    }



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

Mime
View raw message