Pentaho

 View Only

 Deadlock in Transformation Log Table (trans_log) by calculating change date capture

  • Pentaho
  • Kettle
  • Pentaho
  • Pentaho Data Integration PDI
Florian Gehri's profile image
Florian Gehri posted 09-19-2019 05:55

We have a lot of transformations (the most are Dimension lookups and some are fact-lookups) that are running in parallel. Every transformation can run 4 times in parallel.

We achieve that with a "Job executor" Task that start 4 parallel instances. In the JobExecutor are all the transformations.

With this setup it can be, that the Transformation X (which update table X) can run 1,2,3 or 4 times in parallel.

So nothing special, everything is ok with that.

Now, we have the problem (since a short time) that we get a deadlock error in the Transformation Log Table (trans_log):

"There was an error calculating the change data capture date range, it probably involved log table PDI_TRANS_LOG.

Couldn't get row from result set

Transaction (Process ID 53) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction."

 

The Transformation Log Table, user and password is defined in the kettle.properties file. The Database for the logging is a Microsoft SQL 2017 Server on a Linux machine. The database for the lookups and the logging are not the same.

We already implemented the Advaned option in the Database Connection to use a MSSQL logging seq (SEQUENCE_FOR_BATCH_ID). That works fine.

 

We also tried to disable the logging field "startdate" in the Transformation Log, same error again.

 

Can anybody help with a hint?


#Pentaho
#PentahoDataIntegrationPDI
#Kettle
Florian Gehri's profile image
Florian Gehri

Additional Information:

The deadlock-manager of MSSSQL says, that the deadlock occurs from this statement:

"(@P0 nvarchar(4000)) SELECT ENDDATE, DEPDATE, STARTDATE FROM PDI_TRANS_LOG WHERE ERRORS  = 0 AND  STATUS  = 'end' AND  TRANSNAME = @P0 ORDER BY LOGDATE DESC, ENDDATE DESC"

 

Had anyone the same problem?

Matthew Casper's profile image
Matthew Casper

We are experiencing this same issue with deadlocks in SQL Server. We also have the SEQUENCE_FOR_BATCH_ID set in our connection also. Does Page Locking need to be turned off to avoid this error?