How implement fallback mechanism when DB contains shedlock table goes down?

37 Views Asked by At

As per the requirement using @SchedulerLock and it internally uses the table with name "shedlock" for maintaining the details about job acquired the lock. Here, in case, the DB containing the table shedlock went down because of some reason. Then, it will disturb schedulerlock usage and concurrent jobs start the execution at same time. Can someone provide suggestion to handle this scenario.

1

There are 1 best solutions below

0
Lukas On

Are you sure it behaves this way? When the DB is down, the LockProvider should throw an exception. If it doesn't, it's a bug.

But if you want to customize the behavior using this.