tMySQL Output - Deadlock found when trying to get lock; try restarting transaction

Highlighted
Four Stars

tMySQL Output - Deadlock found when trying to get lock; try restarting transaction

Hi All,

I am moving data from one MySQL DB to another MySQL DB.  

A screenshot is given bellow

image.png

We are inserting data to "fact_ebilling" where a column have relation with another table (Table A) . A cron job runs to update certain fields of that "Table A". MySQL uses row level locking before performing any action.

I think while inserting data into fact_ebilling, it checks foreign Key which means it read something from "Table A". At the same time cron job require that row to update. Due to this locking conflict an error was sent from MySQL server as follow

 

[statistics] connected
Deadlock found when trying to get lock; try restarting transaction

 

My question is whether  Talend Open Studio would automatically retry to insert those records or else it requires to restart complete Job? 

In case of restarting Job, It would take couple of days to reinsert all the data. Any solution would be appreciated . Thank you

Highlighted
Community Manager

Re: tMySQL Output - Deadlock found when trying to get lock; try restarting transaction

Hi
You need to restart the complete job if the job throws the exception and stop to run.
Here are more discussions about deadlock issue on stackoverflow.
https://stackoverflow.com/questions/2332768/how-to-avoid-mysql-deadlock-found-when-trying-to-get-loc...

Take a look at it, hope it will give some tips to update the job design to avoid the deadlock issue.

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 3

Read about some useful Context Variable ideas

Blog