XComp commented on a change in pull request #18536:
URL: https://github.com/apache/flink/pull/18536#discussion_r796549838
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/Dispatcher.java
##########
@@ -943,17 +945,16 @@ private void cleanUpHighAvailabilityJobData(JobID jobId) {
private void terminateRunningJobs() {
log.info("Stopping all currently running jobs of dispatcher {}.",
getAddress());
- final HashSet<JobID> jobsToRemove = new
HashSet<>(runningJobs.keySet());
+ final Set<JobID> jobsToRemove =
jobManagerRunnerRegistry.getRunningJobIds();
Review comment:
Good catch. I missed that. I'm going to add the copy constructor to
`JobManagerRunnerRegistry.getRunningJobIds()` and add it analogously to
`JobManagerRunnerRegistry.getJobManagerRunners()` to make these methods more
robust towards `ConcurrentModificationExceptions`.
--
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]