Hello!

Maybe we could issue a developer warning as soon as we detect putAll() with
something which has more than one element and which is not a sorted map?

Like we do with indexed when they don't fit inline, etc.

Regards,
-- 
Ilya Kasnacheev


пн, 18 мар. 2019 г. в 09:13, Павлухин Иван <vololo...@gmail.com>:

> Hi,
>
> When you are working with TRANSACTIONAL cache you should be aware that
> deadlocks might happen. I see the following options to prevent
> deadlocks to happen:
> 1. Explicitly order all keys involved in any transaction using the
> same comparator.
> 2. Use OPTIMISTIC transactions.
>
> Also, in many databases deadlocks can happen as well. So, instead of
> preventing deadlocks it is quite common to provide some means of
> breaking them. In Ignite it is possible to configure a transaction
> timeout. In that case deadlocked transaction will be aborted sooner or
> later and another transaction will be able to make a progress.
>
> > Should it be handle natively in Ignite Core, shouldn't it ?
>
> Unfortunately there is no general way to prevent deadlocks when using
> PutAll with unordered collection. Ignite does not enforce all keys to
> be Comparable which means that there could be keys without defined
> consistent order. And if we cannot order keys consistently then we can
> catch a deadlock.
>
> пн, 18 мар. 2019 г. в 05:53, Tâm Nguyễn Mạnh <nguyenmanhtam...@gmail.com>:
> >
> > Hi Igniters,
> >
> > I heard that It could lead to DeadLocked when I pass non sorted
> collection
> > into putAll method. Is it true ?
> >
> > From document i see that method requires a IEnumerable<KeyValuePair<TK,
> > TV>> as input. I think pass a sorted collection into API is just a
> > workaround way. Should it be handle natively in Ignite Core, shouldn't
> it ?
> >
> > How do you thing ?
> >
> > --
> > Thanks & Best Regards
> >
> > Tam, Nguyen Manh
>
>
>
> --
> Best regards,
> Ivan Pavlukhin
>

Reply via email to