ignite
ignite copied to clipboard
`EVT_NODE_JOINED` Event security context is wrong in listener
// this service deployed by all permission subject server node
class DeploySyncServiceImpl : DeploySyncService {
override fun execute() {
// listen client node joined
ignite.events().localListen(object : IgnitePredicate<DiscoveryEvent> {
override fun apply(e: DiscoveryEvent): Boolean {
// this not local node security context
ignite.context().security().withContext(ignite.cluster().localNode().id()).use {
// must use `withContext` switch to local node security context
}
return true
}
}, EventType.EVT_NODE_JOINED)
}
}