[
https://issues.apache.org/jira/browse/IGNITE-23416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dmitry Pavlov updated IGNITE-23416:
-----------------------------------
Labels: ise (was: )
> Ignite logs that ClientCache#putAll uses unordered map
> ------------------------------------------------------
>
> Key: IGNITE-23416
> URL: https://issues.apache.org/jira/browse/IGNITE-23416
> Project: Ignite
> Issue Type: Bug
> Reporter: Maksim Timonin
> Priority: Minor
> Labels: ise
>
> Even if user puts TreeSet to ClientCache#putAll to transactional cache it
> logs warning that map is unordered.
> {code:java}
> [2024-10-13T15:53:34,892][WARN
> ]client-connector-#76%ignite.MyTest%[GridDhtColocatedCache] <default>
> Unordered map java.util.LinkedHashMap is used for putAll operation on cache
> default. This can lead to a distributed deadlock. Switch to a sorted map like
> TreeMap instead.{code}
> To reproduce:
> {code:java}
> try (IgniteClient cln = Ignition.startClient(clnCfg) {
> ClientCache c = cln.createCache(new ClientCacheConfiguration()
> .setName(DEFAULT_CACHE_NAME)
> .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL));
> Map<Integer, Integer> map = new TreeMap<>();
> map.put(0, 0);
> map.put(1, 1);
> c.putAll(map);
> }{code}
>
> Possible solutions:
> # Log the warn on client side only and skip warning on server side.
> # Send a type of map with `putAll`, but how to fill it on server side?
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)