dybyte commented on code in PR #10075:
URL: https://github.com/apache/seatunnel/pull/10075#discussion_r2589233085
##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/master/JobMaster.java:
##########
@@ -882,7 +888,7 @@ public void savePipelineMetricsToHistory(PipelineLocation
pipelineLocation) {
this.getCurrJobMetrics(Collections.singletonList(pipelineLocation));
JobMetrics jobMetrics = JobMetricsUtil.toJobMetrics(currJobMetrics);
long jobId = this.getJobImmutableInformation().getJobId();
- synchronized (this) {
+ synchronized (metricsLock) {
jobHistoryService.storeFinishedPipelineMetrics(jobId, jobMetrics);
}
Review Comment:
The `storeFinishedPipelineMetrics` method only operates on
`finishedJobMetricsIMap` and is only called from this place, so I did not see a
strong reason to reuse the same lock for mutual exclusion with
stopJob/cancelJob/init. If you see a potential impact I might be missing,
please let me know.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]