[ENT-5752]-Fall back on NM cache if NM service is unreachable during node start-up (#6716)

This commit is contained in:
bpaunescu 2020-09-16 18:13:44 +01:00 committed by GitHub
parent 83ec8289b6
commit 2498bb3ae1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -163,6 +163,11 @@ class NetworkMapUpdater(private val networkMapCache: NetworkMapCacheInternal,
val nextScheduleDelay = try {
updateNetworkMapCache()
} catch (e: Exception) {
// Check to see if networkmap was reachable before and cached information exists
if (networkMapCache.allNodeHashes.size > 1) {
logger.debug("Networkmap Service unreachable but more than one nodeInfo entries found in the cache. Allowing node start-up to proceed.")
networkMapCache.nodeReady.set(null)
}
logger.warn("Error encountered while updating network map, will retry in $defaultRetryInterval", e)
defaultRetryInterval
}