ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anton Vinogradov <avinogra...@gridgain.com>
Subject All BinaryObjects created by BinaryObjectBuilder stored at the same partition by default
Date Thu, 24 Mar 2016 08:43:09 GMT

I found that every BinaryObject created by BinaryObjectBuilder has hashcode
== 0 by default.
This can cause situation that all objects created by code similar to:

*BinaryObject key = builder.setField("id", i).build();*
*streamer.addData(key, key);*

will be stored at one partition and this cause grid performance drop.

Of course user can set hashcode:

*BinaryObject key = builder.setField("id", i).hashCode(random()).build();*

but there is no guarantee that he will.

I propose to generate random hashcode or hashcode based on field's
hashcodes in case no hashcode set or to warn user somehow that he have to
specify it.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message