Adrian, I don't think that will work. The Hash doesn't know the number of
segments so it can't tell where a particular key will land - even assuming
knowledge about how the ConsistentHash will map hash codes to segments.
However, I'm all for replacing the current Hash interface with another
interf
None of the existing Hash implementations can, but this new one will be
special. It could have access to the config (and CH) of the user's cache
so it will know the number of segments. The index cache will have to use
the same type of CH as the data cache in order to keep ownership in sync
and
Thanks Adrian,
right I initially expected doing something like that, but the Hash
contract doesn't expose/leak details about segments. I guess I could
forge a specific hash result but that seems fragile, while my needs
are very simple as I already know the segment id: for a given indexing
back-end
On 20 January 2015 at 13:32, Dan Berindei wrote:
> Adrian, I don't think that will work. The Hash doesn't know the number of
> segments so it can't tell where a particular key will land - even assuming
> knowledge about how the ConsistentHash will map hash codes to segments.
>
> However, I'm all f
On 20 January 2015 at 14:33, Adrian Nistor wrote:
> None of the existing Hash implementations can, but this new one will be
> special. It could have access to the config (and CH) of the user's cache so
> it will know the number of segments. The index cache will have to use the
> same type of CH as