[pipelineX](bug) Fix ConcurrentModificationException for profile reporting (#31040)

This commit is contained in:
Gabriel
2024-02-18 17:13:02 +08:00
committed by yiguolei
parent 3f126fdd63
commit 6504f6de74

View File

@ -3995,11 +3995,7 @@ public class Coordinator implements CoordInterface {
private void attachInstanceProfileToFragmentProfile() {
if (enablePipelineEngine) {
for (PipelineExecContext ctx : pipelineExecContexts.values()) {
if (enablePipelineXEngine) {
synchronized (this) {
ctx.attachPipelineProfileToFragmentProfile();
}
} else {
if (!enablePipelineXEngine) {
ctx.profileStream()
.forEach(p -> executionProfile.addInstanceProfile(ctx.profileFragmentId, p));
}