Deadlocks in BulkInsertOrUpdateAsync causing job to start over

Hi, we have a background worker that uses BulkInsertOrUpdateAsync to insert or update data.

We are having issues with deadlocks which causes the job to start over in hangfire and piles up.

The code:

I have read that i can se holdlock to false in bulkconfig, but i am curious why the job starts over in hangfire. Does anyone have any good solution on how to solve this issue?

Hangfire has no knowledge of what is going on in your job. It is only tracking the job itself and whether it is pending, processing or succeeded (among others). If it fails during processing it goes back to pending. It is up to you to track progress within the job. This is referred to as reentrancy.

https://docs.hangfire.io/en/latest/best-practices.html

I am not sure what is meant by ‘… and piles up.’