[
https://issues.apache.org/jira/browse/IGNITE-14532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pavel Tupitsyn updated IGNITE-14532:
------------------------------------
Description:
Thin client uses LinkedHashMap to preserve client-side entry order. Ignite logs
a warning and there is no way to fix it for the user:
{code}
Unordered map java.util.HashMap is used for putAll operation on cache exact.
This can lead to a distributed deadlock. Switch to a sorted map like TreeMap
instead.
{code}
We should suppress this warning for thin client operations, since it does not
make sense. Thin clients have different language-specific APIs, some of them
don't even use maps. The same applies to PlatformCache (thick C# & C++).
We should have an internal method that does not produce a warning, and,
ideally, does not require a Map. Using LinkedHashMap as an intermediate
collection produces unnecessary overhead and allocations, we could use an array
of key-value pairs instead.
was:
Thin client uses LinkedHashMap to preserve client-side entry order. Ignite logs
a warning and there is no way to fix it for the user:
{code}
Unordered map java.util.HashMap is used for putAll operation on cache exact.
This can lead to a distributed deadlock. Switch to a sorted map like TreeMap
instead.
{code}
We should suppress this warning for thin client operations, since it does not
make sense. Thin clients have different language-specific APIs, some of them
don't even use maps.
The same applies to PlatformCache (thick C# & C++).
> Thin client: Unordered map used for putAll warning is unavoidable
> -----------------------------------------------------------------
>
> Key: IGNITE-14532
> URL: https://issues.apache.org/jira/browse/IGNITE-14532
> Project: Ignite
> Issue Type: New Feature
> Components: thin client
> Reporter: Pavel Tupitsyn
> Assignee: Pavel Tupitsyn
> Priority: Major
> Fix For: 2.11
>
>
> Thin client uses LinkedHashMap to preserve client-side entry order. Ignite
> logs a warning and there is no way to fix it for the user:
> {code}
> Unordered map java.util.HashMap is used for putAll operation on cache exact.
> This can lead to a distributed deadlock. Switch to a sorted map like TreeMap
> instead.
> {code}
> We should suppress this warning for thin client operations, since it does not
> make sense. Thin clients have different language-specific APIs, some of them
> don't even use maps. The same applies to PlatformCache (thick C# & C++).
> We should have an internal method that does not produce a warning, and,
> ideally, does not require a Map. Using LinkedHashMap as an intermediate
> collection produces unnecessary overhead and allocations, we could use an
> array of key-value pairs instead.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)