[
https://issues.jboss.org/browse/ISPN-936?page=com.atlassian.jira.plugin.s...
]
Manik Surtani commented on ISPN-936:
------------------------------------
Actually this is a questionable optimisation. putAll() with a large map of small entries
can be wasteful, but then a small map - say 3 large entries - may be better off sending
this around everywhere since it would be very costly to serialize the map 3 times over for
3 different recipients, each with slightly different contents.
At the end of the day, the putAll() API is purely to satisfy java.util.Map. If you are
using large complex objects or are performance sensitive, use put(K, V) instead. :-)
putAll suboptimal and possibly wrong
------------------------------------
Key: ISPN-936
URL:
https://issues.jboss.org/browse/ISPN-936
Project: Infinispan
Issue Type: Feature Request
Components: Distributed Cache
Affects Versions: 4.2.0.Final
Reporter: Mircea Markus
Assignee: Manik Surtani
DistributionManager.visitPutMapCommand broadcasts ALL the map entries to ALL the nodes to
which keys are mapped.
E.g. if Map={k1=v1, k2=v2} and k1 maps to node A, k2 maps to node B then both A and B
would receive {k1=v1, k2=v2}.
The way it should be is A receives {k1=v1} and B receives {k2=v2}.
This is suboptimal and error prone as, by the look of code, both nodes would store ALL
the data in the data container.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira