[infinispan-dev] DIST and putAll calls

Manik Surtani manik at jboss.org
Thu Jul 9 07:03:13 EDT 2009


On 9 Jul 2009, at 11:06, Galder Zamarreno wrote:

>
>
> 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?

Well, it won't be stored in more than replCount.  Just because a  
PutMapCommand is sent to a node, doesn't mean the node stores all of  
the entries in the map.  Entries that are hashed to the node are  
stored, the rest are left in L1.  See DistLockingInterceptor for this  
transformation ... but anyway this dist code needs to change for other  
reasons.

>
>
>
>>
>> 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

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








More information about the infinispan-dev mailing list