Skip to content

Commit d3584e9

Browse files
committed
fix: ConcurrentModificationException on ReconciliatorWorkerThreadPool
1 parent f0c4c0a commit d3584e9

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

stackgres-k8s/src/operator/src/main/java/io/stackgres/operator/conciliation/ReconciliatorWorkerThreadPool.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,11 @@ void executeReconciliation(ReconciliationRunnable r) {
213213
LOGGER.trace("{} has been scheduled to be reconcilied",
214214
r);
215215
}
216-
toExecuteReconciliations.stream().filter(r::equals).forEach(this::execute);
216+
toExecuteReconciliations.forEach(ter -> {
217+
if (ter.equals(r)) {
218+
this.execute(ter);
219+
}
220+
});
217221
toExecuteReconciliations.remove(r);
218222
}
219223
}

0 commit comments

Comments
 (0)