mirror of
https://github.com/corda/corda.git
synced 2025-01-18 10:46:38 +00:00
ENT-6677: When you clear the cache via the command line it now also updates node_named_identities table. (#7075)
This commit is contained in:
parent
b008f5f42a
commit
20d2e2b3eb
@ -455,7 +455,7 @@ abstract class AbstractNode<S>(val configuration: NodeConfiguration,
|
||||
}
|
||||
}
|
||||
|
||||
fun clearNetworkMapCache() {
|
||||
open fun clearNetworkMapCache() {
|
||||
Node.printBasicNodeInfo("Clearing network map cache entries")
|
||||
log.info("Starting clearing of network map cache entries...")
|
||||
startDatabase()
|
||||
|
@ -564,6 +564,11 @@ open class Node(configuration: NodeConfiguration,
|
||||
return super.generateAndSaveNodeInfo()
|
||||
}
|
||||
|
||||
override fun clearNetworkMapCache() {
|
||||
initialiseSerialization()
|
||||
super.clearNetworkMapCache()
|
||||
}
|
||||
|
||||
override fun runDatabaseMigrationScripts(
|
||||
updateCoreSchemas: Boolean,
|
||||
updateAppSchemas: Boolean,
|
||||
|
@ -455,7 +455,10 @@ open class PersistentNetworkMapCache(cacheFactory: NamedCacheFactory,
|
||||
database.transaction {
|
||||
val result = getAllNodeInfos(session)
|
||||
logger.debug { "Number of node infos to be cleared: ${result.size}" }
|
||||
for (nodeInfo in result) session.remove(nodeInfo)
|
||||
for (nodeInfo in result) {
|
||||
session.remove(nodeInfo)
|
||||
archiveNamedIdentity(session, nodeInfo.toNodeInfo())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user