lhotari commented on PR #24955: URL: https://github.com/apache/pulsar/pull/24955#issuecomment-3499080828
I think we should simply use `Collections.synchronizedList(new ArrayList<>())` instead, however it's possible that it introduces deadlocks. Another optimization would be to add a counter to replace the iteration: https://github.com/apache/pulsar/blob/186b503579f67bc0eaffc99a7e45026e5c3116ab/testmocks/src/main/java/org/apache/bookkeeper/client/PulsarMockLedgerHandle.java#L232-L240 -- 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]
