mirror of
https://github.com/corda/corda.git
synced 2025-01-31 00:24:59 +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")
|
Node.printBasicNodeInfo("Clearing network map cache entries")
|
||||||
log.info("Starting clearing of network map cache entries...")
|
log.info("Starting clearing of network map cache entries...")
|
||||||
startDatabase()
|
startDatabase()
|
||||||
|
@ -564,6 +564,11 @@ open class Node(configuration: NodeConfiguration,
|
|||||||
return super.generateAndSaveNodeInfo()
|
return super.generateAndSaveNodeInfo()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun clearNetworkMapCache() {
|
||||||
|
initialiseSerialization()
|
||||||
|
super.clearNetworkMapCache()
|
||||||
|
}
|
||||||
|
|
||||||
override fun runDatabaseMigrationScripts(
|
override fun runDatabaseMigrationScripts(
|
||||||
updateCoreSchemas: Boolean,
|
updateCoreSchemas: Boolean,
|
||||||
updateAppSchemas: Boolean,
|
updateAppSchemas: Boolean,
|
||||||
|
@ -455,7 +455,10 @@ open class PersistentNetworkMapCache(cacheFactory: NamedCacheFactory,
|
|||||||
database.transaction {
|
database.transaction {
|
||||||
val result = getAllNodeInfos(session)
|
val result = getAllNodeInfos(session)
|
||||||
logger.debug { "Number of node infos to be cleared: ${result.size}" }
|
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…
x
Reference in New Issue
Block a user