Hi Hyma!

Looks like you encountered a classic deadlock. It happens because you put
values into cache in arbitrary order.
This line causes this problem:
*companyDao.nameCache.putAll(kvs)*

So, when multiple threads try to acquire the same locks in different order,
then these operations will be waiting for each other.
To avoid this problem, you should sort data by keys, before calling *putAll*
on it. It can be achieved by using TreeMap. I'm not sure, how to do it in
Scala, sorry.

Let me know if it helps.

Denis

чт, 23 нояб. 2017 г. в 21:14, Hyma <[email protected]>:

> Below is the corresponding code where ignite step was in hung state.
>
> logInfo("Populating the canonical name Cache on Ignite Nodes")
>     val time = System.currentTimeMillis()
>     companyVORDD.mapPartitions(x => {
>       val kvs = x.map(comp =>
> (comp.wcaId,comp)).toMap[String,CompanyVO].asJava
>       companyDao.nameCache.putAll(kvs)
>       x
>     }).count()
>
> And for your information, many times we won't see any issues with this and
> the hung state I mentioned aboveis happening only sometimes.
>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Reply via email to