-
Bug
-
Resolution: Done
-
Major
-
1.0.0.Beta2
-
None
The LogInterceptor captures log events using an ArrayList<> which is not thread-safe. This can lead to
java.util.ConcurrentModificationException at java.base/java.util.ArrayList$Itr.checkForComodification(ArrayList.java:939) at java.base/java.util.ArrayList$Itr.next(ArrayList.java:893) at io.debezium.junit.logging.LogInterceptor.containsMessage(LogInterceptor.java:85) at io.debezium.junit.logging.LogInterceptor.containsWarnMessage(LogInterceptor.java:66) at io.debezium.connector.postgresql.RecordsStreamProducerIT.lambda$shouldWarnOnMissingHeartbeatForFilteredEvents$23(RecordsStreamProducerIT.java:1076) at org.awaitility.core.CallableCondition$ConditionEvaluationWrapper.eval(CallableCondition.java:100) at org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:201) at org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:188) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.base/java.lang.Thread.run(Thread.java:844)
We should probably change the behavior to using a CopyOnWriteArrayList.