mirror of
https://github.com/corda/corda.git
synced 2024-12-20 05:28:21 +00:00
CORDA-2991 shorten poll intervals for node info file propagation (#5240)
* CORDA-2991 shorten poll intervals for node info file propagation * Relax minimum poll time constraint * Relax, not comment out, minimum poll time constraint * Correct error message
This commit is contained in:
parent
6df142bf7a
commit
14a20654bd
@ -37,7 +37,7 @@ class NodeInfoFilesCopier(scheduler: Scheduler = Schedulers.io()) : AutoCloseabl
|
|||||||
private val subscription: Subscription
|
private val subscription: Subscription
|
||||||
|
|
||||||
init {
|
init {
|
||||||
this.subscription = Observable.interval(5, TimeUnit.SECONDS, scheduler)
|
this.subscription = Observable.interval(1, TimeUnit.SECONDS, scheduler)
|
||||||
.subscribe { poll() }
|
.subscribe { poll() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ class NodeInfoWatcher(private val nodePath: Path,
|
|||||||
val processedNodeInfoHashes: Set<SecureHash> get() = nodeInfoFilesMap.values.map { it.nodeInfohash }.toSet()
|
val processedNodeInfoHashes: Set<SecureHash> get() = nodeInfoFilesMap.values.map { it.nodeInfohash }.toSet()
|
||||||
|
|
||||||
init {
|
init {
|
||||||
require(pollInterval >= 5.seconds) { "Poll interval must be 5 seconds or longer." }
|
require(pollInterval >= 1.seconds) { "Poll interval must be 1 second or longer." }
|
||||||
nodeInfosDir.createDirectories()
|
nodeInfosDir.createDirectories()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,6 +264,7 @@ class DriverDSLImpl(
|
|||||||
"address" to portAllocation.nextHostAndPort().toString(),
|
"address" to portAllocation.nextHostAndPort().toString(),
|
||||||
"adminAddress" to portAllocation.nextHostAndPort().toString()
|
"adminAddress" to portAllocation.nextHostAndPort().toString()
|
||||||
),
|
),
|
||||||
|
"additionalNodeInfoPollingFrequencyMsec" to 1000,
|
||||||
"devMode" to false) + customOverrides
|
"devMode" to false) + customOverrides
|
||||||
val config = NodeConfig(ConfigHelper.loadConfig(
|
val config = NodeConfig(ConfigHelper.loadConfig(
|
||||||
baseDirectory = baseDirectory,
|
baseDirectory = baseDirectory,
|
||||||
|
Loading…
Reference in New Issue
Block a user