- Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Distributed Coordination/Cluster CoordinationCluster formation and cluster state publication, including cluster membership and fault detection.Cluster formation and cluster state publication, including cluster membership and fault detection.non-issue"" muted="" aria-describedby="MDU6TGFiZWw3MzU0NA==-tooltip :R1aqdb:">>non-issuehelp wantedadoptmeadoptme
Description
The below allocation hotspot was observed in a 6.2 cluster where there was a flood of shard-failed events fixed in 6.4 as a part of #31313. Although this might not recur on higher versions for shard-failed specifically but still can if there are too many pending tasks but since the below code seems to be used only for logging task summary in debug mode or warning if it turned out to be a slow running task, it seems wasteful for most of the cases.
I think it would make more sense to possibly defer this.
elasticsearch/server/src/main/java/org/elasticsearch/cluster/ClusterStateTaskExecutor.java
Lines 60 to 62 in b33f384
| default String describeTasks(List<T> tasks) { | |
| return String.join(", ", tasks.stream().map(t -> (CharSequence)t.toString()).filter(t -> t.length() > 0)::iterator); | |
| } |
[ 1] org.elasticsearch.cluster.ClusterStateTaskExecutor.lambda$describeTasks$0 [ 2] org.elasticsearch.cluster.ClusterStateTaskExecutor$$Lambda$1757.792151473.apply [ 3] java.util.stream.ReduceOps$2ReducingSink.accept [ 4] java.util.stream.ReferencePipeline$3$1.accept [ 5] java.util.ArrayList$ArrayListSpliterator.forEachRemaining [ 6] java.util.stream.AbstractPipeline.copyInto [ 7] java.util.stream.AbstractPipeline.wrapAndCopyInto [ 8] java.util.stream.ReduceOps$ReduceOp.evaluateSequential [ 9] java.util.stream.AbstractPipeline.evaluate [10] java.util.stream.ReferencePipeline.reduce [11] org.elasticsearch.cluster.ClusterStateTaskExecutor.describeTasks [12] org.elasticsearch.cluster.service.MasterService$Batcher$UpdateTask.describeTasks [13] org.elasticsearch.cluster.service.TaskBatcher.lambda$runIfNotProcessed$6 [14] org.elasticsearch.cluster.service.TaskBatcher$$Lambda$1752.1418423337.apply [15] java.util.stream.ReferencePipeline$3$1.accept [16] java.util.HashMap$EntrySpliterator.forEachRemaining [17] java.util.stream.AbstractPipeline.copyInto [18] java.util.stream.AbstractPipeline.wrapAndCopyInto [19] java.util.stream.ReduceOps$ReduceOp.evaluateSequential [20] java.util.stream.AbstractPipeline.evaluate [21] java.util.stream.ReferencePipeline.reduce [22] org.elasticsearch.cluster.service.TaskBatcher.runIfNotProcessed [23] org.elasticsearch.cluster.service.TaskBatcher$BatchedTask.run [24] org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run Metadata
Metadata
Assignees
Labels
:Distributed Coordination/Cluster CoordinationCluster formation and cluster state publication, including cluster membership and fault detection.Cluster formation and cluster state publication, including cluster membership and fault detection.non-issue"" muted="" aria-describedby="MDU6TGFiZWw3MzU0NA==-tooltip :R2hehb:">>non-issuehelp wantedadoptmeadoptme