From 2498bb3ae1fac1539f3abe954f5be97ff7c0da8b Mon Sep 17 00:00:00 2001 From: bpaunescu Date: Wed, 16 Sep 2020 18:13:44 +0100 Subject: [PATCH] [ENT-5752]-Fall back on NM cache if NM service is unreachable during node start-up (#6716) --- .../net/corda/node/services/network/NetworkMapUpdater.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/node/src/main/kotlin/net/corda/node/services/network/NetworkMapUpdater.kt b/node/src/main/kotlin/net/corda/node/services/network/NetworkMapUpdater.kt index b36f34d632..4b7b596e29 100644 --- a/node/src/main/kotlin/net/corda/node/services/network/NetworkMapUpdater.kt +++ b/node/src/main/kotlin/net/corda/node/services/network/NetworkMapUpdater.kt @@ -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 }