Re: cache operation failed after transaction rolled back due to deadlock
Aleksey, thanks, we will take a look at this ticket and fix it in 2.5. 2018-01-23 19:57 GMT+03:00 Yakov Zhdanov: > Alex Goncharuk, can you please take a look and comment? Test seems to be > valid from my standpoint. > > Yakov Zhdanov, > www.gridgain.com > > 2018-01-22 23:14 GMT-08:00 ALEKSEY KUZNETSOV : > > > > > created ticket with reproducer [1] > > > > I think the fix should be to clear context in tx.close() > > > > [1] https://issues.apache.org/jira/browse/IGNITE-7486 > > > > > 23 янв. 2018 г., в 1:56, Yakov Zhdanov > написал(а): > > > > > > Guys, can you check if you call tx.close(); or properly use > > > try-with-resources construct? > > > > > > Tx context should not be cleared automatically otherwise user would not > > get > > > any notification that original transaction failed. I believe context > > should > > > be cleared on tx.close(). > > > > > > Anyway, let's take a look at reproducer from Alexey first. > > > > > > --Yakov > > > > > > 2018-01-22 2:02 GMT-08:00 ALEKSEY KUZNETSOV >: > > > > > >> Sure > > >> > > >> пн, 22 янв. 2018 г. в 12:25, Andrey Gura : > > >> > > >>> It seems that problem isn't related with deadlock detection and > should > > be > > >>> reproducible when deadlock detection disabled. > > >>> > > >>> Anyway it sounds like a bug. Could you please file a ticket and > provide > > >>> minimal reproducer? > > >>> > > >>> 19 янв. 2018 г. 3:55 PM пользователь "ALEKSEY KUZNETSOV" < > > >>> alkuznetsov...@gmail.com> написал: > > >>> > > Hi, Igntrs! > > > > > > > > When you have your transaction rolled back due to detected deadlock, > > >> you > > are unabled to perform cache operations (in thread where tx was > > started > > >>> and > > rolled back), because it leads to TransactionTimeoutException. > > > > > > > > The reason of such behavior is that tx thread map > > (txManager#threadMap) > > >>> was > > not cleared from tx when roll back occured. > > > > In GridNearTxLocal#onTimeout you can find comment on that : > > > > *// Note: if rollback asynchronously on timeout should not clear > > thread > > map* > > > > *// since thread started tx still should be able to see this tx.* > > > > Cache operation picks up tx from that map and throws exception. > > > > > > > > So, one must create new thread in order to perform cache operations? > > > > > > -- > > > > *Best Regards,* > > > > *Kuznetsov Aleksey* > > > > >>> > > >> > > >> > > >> -- > > >> > > >> *Best Regards,* > > >> > > >> *Kuznetsov Aleksey* > > >> > > >
Re: cache operation failed after transaction rolled back due to deadlock
Alex Goncharuk, can you please take a look and comment? Test seems to be valid from my standpoint. Yakov Zhdanov, www.gridgain.com 2018-01-22 23:14 GMT-08:00 ALEKSEY KUZNETSOV: > > created ticket with reproducer [1] > > I think the fix should be to clear context in tx.close() > > [1] https://issues.apache.org/jira/browse/IGNITE-7486 > > > 23 янв. 2018 г., в 1:56, Yakov Zhdanov написал(а): > > > > Guys, can you check if you call tx.close(); or properly use > > try-with-resources construct? > > > > Tx context should not be cleared automatically otherwise user would not > get > > any notification that original transaction failed. I believe context > should > > be cleared on tx.close(). > > > > Anyway, let's take a look at reproducer from Alexey first. > > > > --Yakov > > > > 2018-01-22 2:02 GMT-08:00 ALEKSEY KUZNETSOV : > > > >> Sure > >> > >> пн, 22 янв. 2018 г. в 12:25, Andrey Gura : > >> > >>> It seems that problem isn't related with deadlock detection and should > be > >>> reproducible when deadlock detection disabled. > >>> > >>> Anyway it sounds like a bug. Could you please file a ticket and provide > >>> minimal reproducer? > >>> > >>> 19 янв. 2018 г. 3:55 PM пользователь "ALEKSEY KUZNETSOV" < > >>> alkuznetsov...@gmail.com> написал: > >>> > Hi, Igntrs! > > > > When you have your transaction rolled back due to detected deadlock, > >> you > are unabled to perform cache operations (in thread where tx was > started > >>> and > rolled back), because it leads to TransactionTimeoutException. > > > > The reason of such behavior is that tx thread map > (txManager#threadMap) > >>> was > not cleared from tx when roll back occured. > > In GridNearTxLocal#onTimeout you can find comment on that : > > *// Note: if rollback asynchronously on timeout should not clear > thread > map* > > *// since thread started tx still should be able to see this tx.* > > Cache operation picks up tx from that map and throws exception. > > > > So, one must create new thread in order to perform cache operations? > > > -- > > *Best Regards,* > > *Kuznetsov Aleksey* > > >>> > >> > >> > >> -- > >> > >> *Best Regards,* > >> > >> *Kuznetsov Aleksey* > >> >
Re: cache operation failed after transaction rolled back due to deadlock
created ticket with reproducer [1] I think the fix should be to clear context in tx.close() [1] https://issues.apache.org/jira/browse/IGNITE-7486 > 23 янв. 2018 г., в 1:56, Yakov Zhdanovнаписал(а): > > Guys, can you check if you call tx.close(); or properly use > try-with-resources construct? > > Tx context should not be cleared automatically otherwise user would not get > any notification that original transaction failed. I believe context should > be cleared on tx.close(). > > Anyway, let's take a look at reproducer from Alexey first. > > --Yakov > > 2018-01-22 2:02 GMT-08:00 ALEKSEY KUZNETSOV : > >> Sure >> >> пн, 22 янв. 2018 г. в 12:25, Andrey Gura : >> >>> It seems that problem isn't related with deadlock detection and should be >>> reproducible when deadlock detection disabled. >>> >>> Anyway it sounds like a bug. Could you please file a ticket and provide >>> minimal reproducer? >>> >>> 19 янв. 2018 г. 3:55 PM пользователь "ALEKSEY KUZNETSOV" < >>> alkuznetsov...@gmail.com> написал: >>> Hi, Igntrs! When you have your transaction rolled back due to detected deadlock, >> you are unabled to perform cache operations (in thread where tx was started >>> and rolled back), because it leads to TransactionTimeoutException. The reason of such behavior is that tx thread map (txManager#threadMap) >>> was not cleared from tx when roll back occured. In GridNearTxLocal#onTimeout you can find comment on that : *// Note: if rollback asynchronously on timeout should not clear thread map* *// since thread started tx still should be able to see this tx.* Cache operation picks up tx from that map and throws exception. So, one must create new thread in order to perform cache operations? -- *Best Regards,* *Kuznetsov Aleksey* >>> >> >> >> -- >> >> *Best Regards,* >> >> *Kuznetsov Aleksey* >>
Re: cache operation failed after transaction rolled back due to deadlock
Guys, can you check if you call tx.close(); or properly use try-with-resources construct? Tx context should not be cleared automatically otherwise user would not get any notification that original transaction failed. I believe context should be cleared on tx.close(). Anyway, let's take a look at reproducer from Alexey first. --Yakov 2018-01-22 2:02 GMT-08:00 ALEKSEY KUZNETSOV: > Sure > > пн, 22 янв. 2018 г. в 12:25, Andrey Gura : > > > It seems that problem isn't related with deadlock detection and should be > > reproducible when deadlock detection disabled. > > > > Anyway it sounds like a bug. Could you please file a ticket and provide > > minimal reproducer? > > > > 19 янв. 2018 г. 3:55 PM пользователь "ALEKSEY KUZNETSOV" < > > alkuznetsov...@gmail.com> написал: > > > > > Hi, Igntrs! > > > > > > > > > > > > When you have your transaction rolled back due to detected deadlock, > you > > > are unabled to perform cache operations (in thread where tx was started > > and > > > rolled back), because it leads to TransactionTimeoutException. > > > > > > > > > > > > The reason of such behavior is that tx thread map (txManager#threadMap) > > was > > > not cleared from tx when roll back occured. > > > > > > In GridNearTxLocal#onTimeout you can find comment on that : > > > > > > *// Note: if rollback asynchronously on timeout should not clear thread > > > map* > > > > > > *// since thread started tx still should be able to see this tx.* > > > > > > Cache operation picks up tx from that map and throws exception. > > > > > > > > > > > > So, one must create new thread in order to perform cache operations? > > > > > > > > > -- > > > > > > *Best Regards,* > > > > > > *Kuznetsov Aleksey* > > > > > > > > -- > > *Best Regards,* > > *Kuznetsov Aleksey* >
Re: cache operation failed after transaction rolled back due to deadlock
Sure пн, 22 янв. 2018 г. в 12:25, Andrey Gura: > It seems that problem isn't related with deadlock detection and should be > reproducible when deadlock detection disabled. > > Anyway it sounds like a bug. Could you please file a ticket and provide > minimal reproducer? > > 19 янв. 2018 г. 3:55 PM пользователь "ALEKSEY KUZNETSOV" < > alkuznetsov...@gmail.com> написал: > > > Hi, Igntrs! > > > > > > > > When you have your transaction rolled back due to detected deadlock, you > > are unabled to perform cache operations (in thread where tx was started > and > > rolled back), because it leads to TransactionTimeoutException. > > > > > > > > The reason of such behavior is that tx thread map (txManager#threadMap) > was > > not cleared from tx when roll back occured. > > > > In GridNearTxLocal#onTimeout you can find comment on that : > > > > *// Note: if rollback asynchronously on timeout should not clear thread > > map* > > > > *// since thread started tx still should be able to see this tx.* > > > > Cache operation picks up tx from that map and throws exception. > > > > > > > > So, one must create new thread in order to perform cache operations? > > > > > > -- > > > > *Best Regards,* > > > > *Kuznetsov Aleksey* > > > -- *Best Regards,* *Kuznetsov Aleksey*
Re: cache operation failed after transaction rolled back due to deadlock
It seems that problem isn't related with deadlock detection and should be reproducible when deadlock detection disabled. Anyway it sounds like a bug. Could you please file a ticket and provide minimal reproducer? 19 янв. 2018 г. 3:55 PM пользователь "ALEKSEY KUZNETSOV" < alkuznetsov...@gmail.com> написал: > Hi, Igntrs! > > > > When you have your transaction rolled back due to detected deadlock, you > are unabled to perform cache operations (in thread where tx was started and > rolled back), because it leads to TransactionTimeoutException. > > > > The reason of such behavior is that tx thread map (txManager#threadMap) was > not cleared from tx when roll back occured. > > In GridNearTxLocal#onTimeout you can find comment on that : > > *// Note: if rollback asynchronously on timeout should not clear thread > map* > > *// since thread started tx still should be able to see this tx.* > > Cache operation picks up tx from that map and throws exception. > > > > So, one must create new thread in order to perform cache operations? > > > -- > > *Best Regards,* > > *Kuznetsov Aleksey* >