You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Raymond Wilson <ra...@trimble.com> on 2020/06/12 04:37:48 UTC
HashMap warning when using PutAll()
We are using Ignite v2.8.0 and the C# client. Some of our operations use
PutAll() to save a collection of items in a single operation. This
operation is emitting the following warning into the log:
2020-06-10 15:04:14,199 [77] WRN [ImmutableClientServer]
<Spatial-SubGridDirectory-Immutable> Unordered map java.util.HashMap is
used for putAll operation on cache Spatial-SubGridDirectory-Immutable. This
can lead to a distributed deadlock. Switch to a sorted map like TreeMap
instead.
Does this require a Jira ticket?
Thanks,
Raymond.
--
<http://www.trimble.com/>
Raymond Wilson
Solution Architect, Civil Construction Software Systems (CCSS)
11 Birmingham Drive | Christchurch, New Zealand
+64-21-2013317 Mobile
raymond_wilson@trimble.com
<https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
Re: HashMap warning when using PutAll()
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
If your Map is a singleton (only one pair) the warning should not be
printed :)
Regards,
--
Ilya Kasnacheev
ср, 17 июн. 2020 г. в 23:22, Raymond Wilson <ra...@trimble.com>:
> Hi Ilya,
>
> Thank you for the SortedDictionary pointer.
>
> I am not sure what you mean by 'size-1 collections'. Is there an issue
> here that requires fixing in Ignite, or just the use of SortedDIctionary in
> my client code?
>
> Thanks,
> Raymond.
>
> On Thu, Jun 18, 2020 at 3:45 AM Ilya Kasnacheev <il...@gmail.com>
> wrote:
>
>> Hello!
>>
>> The warning should not be issued for size-1 collections.
>> In dotnet, you should use SortedDictionary with putAll.
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> сб, 13 июн. 2020 г. в 09:43, Raymond Wilson <ra...@trimble.com>:
>>
>>> If the answer is that the consumer of the C# client should order the
>>> items before calling PutAll(), how does the consumer of the C# client
>>> ensure that is the case before calling PutAll()?
>>>
>>> On Sat, Jun 13, 2020 at 4:13 PM Raymond Wilson <
>>> raymond_wilson@trimble.com> wrote:
>>>
>>>> Hi Evgenii,
>>>>
>>>> Thanks for the quick response and clarification :)
>>>>
>>>> Does this mean the C# client is looking at the collection provided to
>>>> it and choosing treemap vs hashmap for an internal call to the Ignite Java
>>>> layer based on whether the content of the collection provided is sorted?
>>>>
>>>> Thanks,
>>>> Raymond.
>>>>
>>>>
>>>> On Sat, Jun 13, 2020 at 2:23 AM Evgenii Zhuravlev <
>>>> e.zhuravlev.wk@gmail.com> wrote:
>>>>
>>>>> The same works for other operations too(like removeAll).
>>>>>
>>>>> Evgenii
>>>>>
>>>>> пт, 12 июн. 2020 г. в 07:22, Evgenii Zhuravlev <
>>>>> e.zhuravlev.wk@gmail.com>:
>>>>>
>>>>>> Raymond,
>>>>>>
>>>>>> Collections used in putAll should be sorted, because otherwise if
>>>>>> they have the same entries but in a different order, it can lead to the
>>>>>> classic deadlock. It is expected behavior.
>>>>>>
>>>>>> Best Regards,
>>>>>> Evgenii
>>>>>>
>>>>>> чт, 11 июн. 2020 г. в 21:38, Raymond Wilson <
>>>>>> raymond_wilson@trimble.com>:
>>>>>>
>>>>>>> We are using Ignite v2.8.0 and the C# client. Some of our operations
>>>>>>> use PutAll() to save a collection of items in a single operation. This
>>>>>>> operation is emitting the following warning into the log:
>>>>>>>
>>>>>>> 2020-06-10 15:04:14,199 [77] WRN [ImmutableClientServer]
>>>>>>> <Spatial-SubGridDirectory-Immutable> Unordered map java.util.HashMap is
>>>>>>> used for putAll operation on cache Spatial-SubGridDirectory-Immutable. This
>>>>>>> can lead to a distributed deadlock. Switch to a sorted map like TreeMap
>>>>>>> instead.
>>>>>>>
>>>>>>> Does this require a Jira ticket?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Raymond.
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> <http://www.trimble.com/>
>>>>>>> Raymond Wilson
>>>>>>> Solution Architect, Civil Construction Software Systems (CCSS)
>>>>>>> 11 Birmingham Drive | Christchurch, New Zealand
>>>>>>> +64-21-2013317 Mobile
>>>>>>> raymond_wilson@trimble.com
>>>>>>>
>>>>>>>
>>>>>>> <https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
>>>>>>>
>>>>>>
>>>>
>>>> --
>>>> <http://www.trimble.com/>
>>>> Raymond Wilson
>>>> Solution Architect, Civil Construction Software Systems (CCSS)
>>>> 11 Birmingham Drive | Christchurch, New Zealand
>>>> +64-21-2013317 Mobile
>>>> raymond_wilson@trimble.com
>>>>
>>>>
>>>> <https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
>>>>
>>>
>>>
>>> --
>>> <http://www.trimble.com/>
>>> Raymond Wilson
>>> Solution Architect, Civil Construction Software Systems (CCSS)
>>> 11 Birmingham Drive | Christchurch, New Zealand
>>> +64-21-2013317 Mobile
>>> raymond_wilson@trimble.com
>>>
>>>
>>> <https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
>>>
>>
>
> --
> <http://www.trimble.com/>
> Raymond Wilson
> Solution Architect, Civil Construction Software Systems (CCSS)
> 11 Birmingham Drive | Christchurch, New Zealand
> +64-21-2013317 Mobile
> raymond_wilson@trimble.com
>
>
> <https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
>
Re: HashMap warning when using PutAll()
Posted by Raymond Wilson <ra...@trimble.com>.
Hi Ilya,
Thank you for the SortedDictionary pointer.
I am not sure what you mean by 'size-1 collections'. Is there an issue here
that requires fixing in Ignite, or just the use of SortedDIctionary in my
client code?
Thanks,
Raymond.
On Thu, Jun 18, 2020 at 3:45 AM Ilya Kasnacheev <il...@gmail.com>
wrote:
> Hello!
>
> The warning should not be issued for size-1 collections.
> In dotnet, you should use SortedDictionary with putAll.
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> сб, 13 июн. 2020 г. в 09:43, Raymond Wilson <ra...@trimble.com>:
>
>> If the answer is that the consumer of the C# client should order the
>> items before calling PutAll(), how does the consumer of the C# client
>> ensure that is the case before calling PutAll()?
>>
>> On Sat, Jun 13, 2020 at 4:13 PM Raymond Wilson <
>> raymond_wilson@trimble.com> wrote:
>>
>>> Hi Evgenii,
>>>
>>> Thanks for the quick response and clarification :)
>>>
>>> Does this mean the C# client is looking at the collection provided to it
>>> and choosing treemap vs hashmap for an internal call to the Ignite Java
>>> layer based on whether the content of the collection provided is sorted?
>>>
>>> Thanks,
>>> Raymond.
>>>
>>>
>>> On Sat, Jun 13, 2020 at 2:23 AM Evgenii Zhuravlev <
>>> e.zhuravlev.wk@gmail.com> wrote:
>>>
>>>> The same works for other operations too(like removeAll).
>>>>
>>>> Evgenii
>>>>
>>>> пт, 12 июн. 2020 г. в 07:22, Evgenii Zhuravlev <
>>>> e.zhuravlev.wk@gmail.com>:
>>>>
>>>>> Raymond,
>>>>>
>>>>> Collections used in putAll should be sorted, because otherwise if they
>>>>> have the same entries but in a different order, it can lead to the classic
>>>>> deadlock. It is expected behavior.
>>>>>
>>>>> Best Regards,
>>>>> Evgenii
>>>>>
>>>>> чт, 11 июн. 2020 г. в 21:38, Raymond Wilson <
>>>>> raymond_wilson@trimble.com>:
>>>>>
>>>>>> We are using Ignite v2.8.0 and the C# client. Some of our operations
>>>>>> use PutAll() to save a collection of items in a single operation. This
>>>>>> operation is emitting the following warning into the log:
>>>>>>
>>>>>> 2020-06-10 15:04:14,199 [77] WRN [ImmutableClientServer]
>>>>>> <Spatial-SubGridDirectory-Immutable> Unordered map java.util.HashMap is
>>>>>> used for putAll operation on cache Spatial-SubGridDirectory-Immutable. This
>>>>>> can lead to a distributed deadlock. Switch to a sorted map like TreeMap
>>>>>> instead.
>>>>>>
>>>>>> Does this require a Jira ticket?
>>>>>>
>>>>>> Thanks,
>>>>>> Raymond.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> <http://www.trimble.com/>
>>>>>> Raymond Wilson
>>>>>> Solution Architect, Civil Construction Software Systems (CCSS)
>>>>>> 11 Birmingham Drive | Christchurch, New Zealand
>>>>>> +64-21-2013317 Mobile
>>>>>> raymond_wilson@trimble.com
>>>>>>
>>>>>>
>>>>>> <https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
>>>>>>
>>>>>
>>>
>>> --
>>> <http://www.trimble.com/>
>>> Raymond Wilson
>>> Solution Architect, Civil Construction Software Systems (CCSS)
>>> 11 Birmingham Drive | Christchurch, New Zealand
>>> +64-21-2013317 Mobile
>>> raymond_wilson@trimble.com
>>>
>>>
>>> <https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
>>>
>>
>>
>> --
>> <http://www.trimble.com/>
>> Raymond Wilson
>> Solution Architect, Civil Construction Software Systems (CCSS)
>> 11 Birmingham Drive | Christchurch, New Zealand
>> +64-21-2013317 Mobile
>> raymond_wilson@trimble.com
>>
>>
>> <https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
>>
>
--
<http://www.trimble.com/>
Raymond Wilson
Solution Architect, Civil Construction Software Systems (CCSS)
11 Birmingham Drive | Christchurch, New Zealand
+64-21-2013317 Mobile
raymond_wilson@trimble.com
<https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
Re: HashMap warning when using PutAll()
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
The warning should not be issued for size-1 collections.
In dotnet, you should use SortedDictionary with putAll.
Regards,
--
Ilya Kasnacheev
сб, 13 июн. 2020 г. в 09:43, Raymond Wilson <ra...@trimble.com>:
> If the answer is that the consumer of the C# client should order the items
> before calling PutAll(), how does the consumer of the C# client ensure that
> is the case before calling PutAll()?
>
> On Sat, Jun 13, 2020 at 4:13 PM Raymond Wilson <ra...@trimble.com>
> wrote:
>
>> Hi Evgenii,
>>
>> Thanks for the quick response and clarification :)
>>
>> Does this mean the C# client is looking at the collection provided to it
>> and choosing treemap vs hashmap for an internal call to the Ignite Java
>> layer based on whether the content of the collection provided is sorted?
>>
>> Thanks,
>> Raymond.
>>
>>
>> On Sat, Jun 13, 2020 at 2:23 AM Evgenii Zhuravlev <
>> e.zhuravlev.wk@gmail.com> wrote:
>>
>>> The same works for other operations too(like removeAll).
>>>
>>> Evgenii
>>>
>>> пт, 12 июн. 2020 г. в 07:22, Evgenii Zhuravlev <e.zhuravlev.wk@gmail.com
>>> >:
>>>
>>>> Raymond,
>>>>
>>>> Collections used in putAll should be sorted, because otherwise if they
>>>> have the same entries but in a different order, it can lead to the classic
>>>> deadlock. It is expected behavior.
>>>>
>>>> Best Regards,
>>>> Evgenii
>>>>
>>>> чт, 11 июн. 2020 г. в 21:38, Raymond Wilson <raymond_wilson@trimble.com
>>>> >:
>>>>
>>>>> We are using Ignite v2.8.0 and the C# client. Some of our operations
>>>>> use PutAll() to save a collection of items in a single operation. This
>>>>> operation is emitting the following warning into the log:
>>>>>
>>>>> 2020-06-10 15:04:14,199 [77] WRN [ImmutableClientServer]
>>>>> <Spatial-SubGridDirectory-Immutable> Unordered map java.util.HashMap is
>>>>> used for putAll operation on cache Spatial-SubGridDirectory-Immutable. This
>>>>> can lead to a distributed deadlock. Switch to a sorted map like TreeMap
>>>>> instead.
>>>>>
>>>>> Does this require a Jira ticket?
>>>>>
>>>>> Thanks,
>>>>> Raymond.
>>>>>
>>>>>
>>>>> --
>>>>> <http://www.trimble.com/>
>>>>> Raymond Wilson
>>>>> Solution Architect, Civil Construction Software Systems (CCSS)
>>>>> 11 Birmingham Drive | Christchurch, New Zealand
>>>>> +64-21-2013317 Mobile
>>>>> raymond_wilson@trimble.com
>>>>>
>>>>>
>>>>> <https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
>>>>>
>>>>
>>
>> --
>> <http://www.trimble.com/>
>> Raymond Wilson
>> Solution Architect, Civil Construction Software Systems (CCSS)
>> 11 Birmingham Drive | Christchurch, New Zealand
>> +64-21-2013317 Mobile
>> raymond_wilson@trimble.com
>>
>>
>> <https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
>>
>
>
> --
> <http://www.trimble.com/>
> Raymond Wilson
> Solution Architect, Civil Construction Software Systems (CCSS)
> 11 Birmingham Drive | Christchurch, New Zealand
> +64-21-2013317 Mobile
> raymond_wilson@trimble.com
>
>
> <https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
>
Re: HashMap warning when using PutAll()
Posted by Raymond Wilson <ra...@trimble.com>.
If the answer is that the consumer of the C# client should order the items
before calling PutAll(), how does the consumer of the C# client ensure that
is the case before calling PutAll()?
On Sat, Jun 13, 2020 at 4:13 PM Raymond Wilson <ra...@trimble.com>
wrote:
> Hi Evgenii,
>
> Thanks for the quick response and clarification :)
>
> Does this mean the C# client is looking at the collection provided to it
> and choosing treemap vs hashmap for an internal call to the Ignite Java
> layer based on whether the content of the collection provided is sorted?
>
> Thanks,
> Raymond.
>
>
> On Sat, Jun 13, 2020 at 2:23 AM Evgenii Zhuravlev <
> e.zhuravlev.wk@gmail.com> wrote:
>
>> The same works for other operations too(like removeAll).
>>
>> Evgenii
>>
>> пт, 12 июн. 2020 г. в 07:22, Evgenii Zhuravlev <e.zhuravlev.wk@gmail.com
>> >:
>>
>>> Raymond,
>>>
>>> Collections used in putAll should be sorted, because otherwise if they
>>> have the same entries but in a different order, it can lead to the classic
>>> deadlock. It is expected behavior.
>>>
>>> Best Regards,
>>> Evgenii
>>>
>>> чт, 11 июн. 2020 г. в 21:38, Raymond Wilson <raymond_wilson@trimble.com
>>> >:
>>>
>>>> We are using Ignite v2.8.0 and the C# client. Some of our operations
>>>> use PutAll() to save a collection of items in a single operation. This
>>>> operation is emitting the following warning into the log:
>>>>
>>>> 2020-06-10 15:04:14,199 [77] WRN [ImmutableClientServer]
>>>> <Spatial-SubGridDirectory-Immutable> Unordered map java.util.HashMap is
>>>> used for putAll operation on cache Spatial-SubGridDirectory-Immutable. This
>>>> can lead to a distributed deadlock. Switch to a sorted map like TreeMap
>>>> instead.
>>>>
>>>> Does this require a Jira ticket?
>>>>
>>>> Thanks,
>>>> Raymond.
>>>>
>>>>
>>>> --
>>>> <http://www.trimble.com/>
>>>> Raymond Wilson
>>>> Solution Architect, Civil Construction Software Systems (CCSS)
>>>> 11 Birmingham Drive | Christchurch, New Zealand
>>>> +64-21-2013317 Mobile
>>>> raymond_wilson@trimble.com
>>>>
>>>>
>>>> <https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
>>>>
>>>
>
> --
> <http://www.trimble.com/>
> Raymond Wilson
> Solution Architect, Civil Construction Software Systems (CCSS)
> 11 Birmingham Drive | Christchurch, New Zealand
> +64-21-2013317 Mobile
> raymond_wilson@trimble.com
>
>
> <https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
>
--
<http://www.trimble.com/>
Raymond Wilson
Solution Architect, Civil Construction Software Systems (CCSS)
11 Birmingham Drive | Christchurch, New Zealand
+64-21-2013317 Mobile
raymond_wilson@trimble.com
<https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
Re: HashMap warning when using PutAll()
Posted by Raymond Wilson <ra...@trimble.com>.
Hi Evgenii,
Thanks for the quick response and clarification :)
Does this mean the C# client is looking at the collection provided to it
and choosing treemap vs hashmap for an internal call to the Ignite Java
layer based on whether the content of the collection provided is sorted?
Thanks,
Raymond.
On Sat, Jun 13, 2020 at 2:23 AM Evgenii Zhuravlev <e....@gmail.com>
wrote:
> The same works for other operations too(like removeAll).
>
> Evgenii
>
> пт, 12 июн. 2020 г. в 07:22, Evgenii Zhuravlev <e....@gmail.com>:
>
>> Raymond,
>>
>> Collections used in putAll should be sorted, because otherwise if they
>> have the same entries but in a different order, it can lead to the classic
>> deadlock. It is expected behavior.
>>
>> Best Regards,
>> Evgenii
>>
>> чт, 11 июн. 2020 г. в 21:38, Raymond Wilson <ra...@trimble.com>:
>>
>>> We are using Ignite v2.8.0 and the C# client. Some of our operations use
>>> PutAll() to save a collection of items in a single operation. This
>>> operation is emitting the following warning into the log:
>>>
>>> 2020-06-10 15:04:14,199 [77] WRN [ImmutableClientServer]
>>> <Spatial-SubGridDirectory-Immutable> Unordered map java.util.HashMap is
>>> used for putAll operation on cache Spatial-SubGridDirectory-Immutable. This
>>> can lead to a distributed deadlock. Switch to a sorted map like TreeMap
>>> instead.
>>>
>>> Does this require a Jira ticket?
>>>
>>> Thanks,
>>> Raymond.
>>>
>>>
>>> --
>>> <http://www.trimble.com/>
>>> Raymond Wilson
>>> Solution Architect, Civil Construction Software Systems (CCSS)
>>> 11 Birmingham Drive | Christchurch, New Zealand
>>> +64-21-2013317 Mobile
>>> raymond_wilson@trimble.com
>>>
>>>
>>> <https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
>>>
>>
--
<http://www.trimble.com/>
Raymond Wilson
Solution Architect, Civil Construction Software Systems (CCSS)
11 Birmingham Drive | Christchurch, New Zealand
+64-21-2013317 Mobile
raymond_wilson@trimble.com
<https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
Re: HashMap warning when using PutAll()
Posted by Evgenii Zhuravlev <e....@gmail.com>.
The same works for other operations too(like removeAll).
Evgenii
пт, 12 июн. 2020 г. в 07:22, Evgenii Zhuravlev <e....@gmail.com>:
> Raymond,
>
> Collections used in putAll should be sorted, because otherwise if they
> have the same entries but in a different order, it can lead to the classic
> deadlock. It is expected behavior.
>
> Best Regards,
> Evgenii
>
> чт, 11 июн. 2020 г. в 21:38, Raymond Wilson <ra...@trimble.com>:
>
>> We are using Ignite v2.8.0 and the C# client. Some of our operations use
>> PutAll() to save a collection of items in a single operation. This
>> operation is emitting the following warning into the log:
>>
>> 2020-06-10 15:04:14,199 [77] WRN [ImmutableClientServer]
>> <Spatial-SubGridDirectory-Immutable> Unordered map java.util.HashMap is
>> used for putAll operation on cache Spatial-SubGridDirectory-Immutable. This
>> can lead to a distributed deadlock. Switch to a sorted map like TreeMap
>> instead.
>>
>> Does this require a Jira ticket?
>>
>> Thanks,
>> Raymond.
>>
>>
>> --
>> <http://www.trimble.com/>
>> Raymond Wilson
>> Solution Architect, Civil Construction Software Systems (CCSS)
>> 11 Birmingham Drive | Christchurch, New Zealand
>> +64-21-2013317 Mobile
>> raymond_wilson@trimble.com
>>
>>
>> <https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
>>
>
Re: HashMap warning when using PutAll()
Posted by Evgenii Zhuravlev <e....@gmail.com>.
Raymond,
Collections used in putAll should be sorted, because otherwise if they have
the same entries but in a different order, it can lead to the classic
deadlock. It is expected behavior.
Best Regards,
Evgenii
чт, 11 июн. 2020 г. в 21:38, Raymond Wilson <ra...@trimble.com>:
> We are using Ignite v2.8.0 and the C# client. Some of our operations use
> PutAll() to save a collection of items in a single operation. This
> operation is emitting the following warning into the log:
>
> 2020-06-10 15:04:14,199 [77] WRN [ImmutableClientServer]
> <Spatial-SubGridDirectory-Immutable> Unordered map java.util.HashMap is
> used for putAll operation on cache Spatial-SubGridDirectory-Immutable. This
> can lead to a distributed deadlock. Switch to a sorted map like TreeMap
> instead.
>
> Does this require a Jira ticket?
>
> Thanks,
> Raymond.
>
>
> --
> <http://www.trimble.com/>
> Raymond Wilson
> Solution Architect, Civil Construction Software Systems (CCSS)
> 11 Birmingham Drive | Christchurch, New Zealand
> +64-21-2013317 Mobile
> raymond_wilson@trimble.com
>
>
> <https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>
>