[infinispan-dev] DIST and putAll calls
Manik Surtani
manik at jboss.org
Thu Jul 9 05:49:50 EDT 2009
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.
Cheers
--
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