Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MastersListener: Fix race conditions around static 'blacklist' map
This fixes two primary issues around this static map: * The first being that it was a simple 'HashMap' despite being modified and read from multiple threads, possibly concurrently * The second is to fix a condition where an entry in the blacklist map may be updated, but still removed from 'resetOldsBlackListHosts' - This fix is to use the ConcurrentMap functionality to verify the value on the removal, so that if the value has been updated, the removal wont proceed. Additional there is a slight performance improvement in 'resetOldsBlackListHosts' by both not needing to copy the key set, as well as iterating over the entry set to avoid the additional .get() call to get the stored time value.
- Loading branch information