You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ilya Kasnacheev (Jira)" <ji...@apache.org> on 2019/09/05 13:13:00 UTC
[jira] [Resolved] (IGNITE-11558) Developer warning when HashMap is
passed to putAll()
[ https://issues.apache.org/jira/browse/IGNITE-11558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ilya Kasnacheev resolved IGNITE-11558.
--------------------------------------
Resolution: Duplicate
> Developer warning when HashMap is passed to putAll()
> ----------------------------------------------------
>
> Key: IGNITE-11558
> URL: https://issues.apache.org/jira/browse/IGNITE-11558
> Project: Ignite
> Issue Type: Improvement
> Components: cache
> Affects Versions: 2.7
> Reporter: Ilya Kasnacheev
> Assignee: Ilya Kasnacheev
> Priority: Major
>
> Currently when HashMap is passed to putAll it's very easy to cause deadlock since the order of keys is not stable.
> This is a pity because users will use HashMap by default and not expect any trouble.
> We should issue a warning when user passes HashMap (but not LinkedHashMap) to putAll(). On .Net we should probably check for Dictionary. Warning similar to the one issues when index cannot be efficiently inlined.
> Another approach is to turn keys into binary form and then sort them, if map is not a SortedMap.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)