GENIUS-202 GENIUS-257 Retry for Unlock() & IdManager calls tryLock() 11/83111/5
authorAnkit Jain <ankit.j.jain@ericsson.com>
Mon, 3 Sep 2018 09:47:28 +0000 (15:17 +0530)
committerFaseela K <faseela.k@ericsson.com>
Tue, 27 Aug 2019 07:19:18 +0000 (07:19 +0000)
commit81e6be70b201c1940cec82a72a8ab34db7c565d2
treebad88a589790644a67b63f0e2034d047d5692d1d
parentff806d6275414072485370bc2ec604814f83ad64
GENIUS-202 GENIUS-257 Retry for Unlock() & IdManager calls tryLock()

** LockManager's unlock() method now retries 10 times in case of
exception is thrown. The interval between retries is 1 sec.

** LockManager's lock() method now eternally retries in case of
DataStoreUnavailableException and OptimisticLockFailedException
otherwise it returns FailedRpcResult.

** IdManager no longer calls LockManager's lock() api. It now calls
LockManager's tryLock() api which internally retries for 10 times.
Idmanager returns failure if lock is not acquired after specified lock
attempts. After this change, it is the responsibility of the consumers of
Idmanager to handle these failures.

Change-Id: Ic230e2e4edce4f95ee461ef22ff895368af9663d
Signed-off-by: Ankit Jain <ankit.j.jain@ericsson.com>
Signed-off-by: Amitesh Soni <amitesh.soni@ericsson.com>
idmanager/idmanager-impl/src/main/java/org/opendaylight/genius/idmanager/IdUtils.java
lockmanager/lockmanager-impl/src/main/java/org/opendaylight/genius/lockmanager/impl/LockManagerServiceImpl.java