Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.7.0, 2.0.0
-
None
-
None
Description
The UpdateFollower class has the following logic:
private void spawnInitialUpdater(final Updateable<K> updateable, final int initUpdateRetryDelay) { K firstFullImage = null; try { firstFullImage = imageRetreiver.retrieveFullImage(INIT_SEQ_NUM); } catch (Exception e) { LOGGER.warn("InitialUpdater encountered exception !! ", e); firstFullImage = null; Thread initUpdater = new Thread() { @Override public void run() { ... Retry logic here } ... }
There is no synchronization with this retry thread. More over it isn't clear what is the benefit of such async recovery.
For example, later in the code, handleUpdateNotification{} accesses updateable field without checking whether it is null or not, but even if it would, we may get inconsistency due to async nature of updates.