'Deadlock when multiple Spring batch Jobs trying to update the same record but for different column value

I have spring batch based different ETl jobs which write into the same table (Db : sql server). At the same time, sometimes the jobs write into same record but they update different column of same record. This results in deadlock. How to avoid it?

this is a report table which has aggregated metrics of different parameters as column values. And for every parameter a batch job calculates the metrics and updates the record for the given market and distribution center (primary key).

Is there any isolation level or config that can be used or is it a design flaw? suggestions to improve?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source