You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe
I am wondering if the ClusterStateAppliers and ClusterStateListeners need to be single threaded. While consuming single ClusterChangedEvent, we can execute all the appliers and listeners in parallel, given there is no implicit guarantee on the order of these appliers and listeners anyway. For example:
for (ClusterStateApplier applier : clusterStateAppliers) {
logger.trace("calling [{}] with change to version [{}]", applier, clusterChangedEvent.state().version());
try (TimingHandle ignored = stopWatch.timing("running applier [" + applier + "]")) {
long applierStartTimeNS = System.nanoTime();
// Execute all the appliers in parallel using separate threadpool
applier.applyClusterState(clusterChangedEvent);
}
// wait for all appliers to finish executing to prevent cluster state update thread to consume next event
// record latency for the cluster state applier operation
}
We can do same thing for listeners as well. Am I missing something?
Describe the solution you'd like
Execute all the appliers and listeners concurrently
Related component
Cluster Manager
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe
I am wondering if the
ClusterStateAppliers
andClusterStateListeners
need to be single threaded. While consuming singleClusterChangedEvent
, we can execute all the appliers and listeners in parallel, given there is no implicit guarantee on the order of these appliers and listeners anyway. For example:We can do same thing for listeners as well. Am I missing something?
Describe the solution you'd like
Execute all the appliers and listeners concurrently
Related component
Cluster Manager
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: