-
Story
-
Resolution: Done
-
Blocker
-
JBoss A-MQ 6.2
-
1
As part of an ENH we recently completed to add a file locker mechanism, we also added a check to see if the file exists itself.
return lock != null && lock.isValid() && file.exists();
This does the job great with a single broker, i.e. you delete the lock file and broker shuts down in this case. When you add a slave to the mix, there is a timing game that goes on. If you are lucky your keep alive timer triggers before your slave asks for the lock. Increasing the period that the slave asks for the lock helps minimize the exposure, but you could still get unlucky.
To fill this gap, Gary had an idea that when the slave asks for the lock, it could also check if the file exists and possibly stop or recreate the file and start. Either way the master and slave should not both be alive in this case.