[infinispan-dev] DIST and putAll calls

Galder Zamarreno galder.zamarreno at redhat.com
Thu Jul 9 06:06:55 EDT 2009



On 07/09/2009 11:49 AM, Manik Surtani wrote:
>
> On 8 Jul 2009, at 16:13, Galder Zamarreno wrote:
>
>> Hi,
>>
>> Re: https://jira.jboss.org/jira/browse/ISPN-120
>>
>> While looking at this, I've started thinking how DIST dealt with
>> putAll() calls. It looks, based on
>> MultipleKeysRecipientGenerator.generateRecipients() that there's a
>> union made of all the recipients for all the keys in the putAll(). Is
>> that how's that supposed to work?
>>
>> Theoretically, it looks to me there should be a put op called for each
>> of the keys but obviously, doing the current way is more performant in
>> spite of creating more copies in the cluster than the number of owners
>> set.
>
> Well there will always be a tradeoff. And that tradeoff will depend on a
> number of factors, including the size of the map passed to putAll and
> the degree of overlap in entry colocation. If we know we have a low
> degree of overlap it may make sense to break up the map; but if the map
> is small it may be cheaper/quicker to just let everyone have the map and
> discard what they don't need.

Fair enough. It might be worth overriding the putAll() definition and 
explaining this so that users are aware of this and we don't get JIRAs 
filled saying that a putAll() replicated to more than repl count. Thoughts?



>
> Cheers
> --
> Manik Surtani
> manik at jboss.org
> Lead, Infinispan
> Lead, JBoss Cache
> http://www.infinispan.org
> http://www.jbosscache.org
>
>
>
>

-- 
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache



More information about the infinispan-dev mailing list