Skip to Content

​select and insert in batches to a table result in TrexUpdate failed on table error


I am inserting records to a table and in doing so, I check if that record already exists and if so I just skip inserting that record.

This table is a column store. And I do the inserts in batches. I use "select TOP 1 1 FROM ABC WHERE ...." to check the existence of records. In the process I get the following error,

[java] class - SAP DBTech JDBC: [131]: transaction rolled back by lock wait timeout: TrexUpdate failed on table 'XYZ:ABC' with error: transaction rolled back by lock wait timeout: Lock timeout occurs while waiting RECORD_LOCK of mode EXCLUSIVE(TRANSACTION_ID=35, UPDATE_TRANSACTION_ID=979468), rc=4628(input position 270)

I don't think I run the existence check and the batch insert at the same time, I wonder how this lock occurs. Any help is highly appreciated.

Thank you.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers