[ 
https://issues.apache.org/jira/browse/IGNITE-23416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maksim Timonin updated IGNITE-23416:
------------------------------------
    Description: 
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}

  was:
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}
 


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



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to