hangc0276 commented on a change in pull request #10536:
URL: https://github.com/apache/pulsar/pull/10536#discussion_r630273630
##########
File path:
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/coordination/impl/LockManagerImpl.java
##########
@@ -115,9 +115,11 @@ private void handleSessionEvent(SessionEvent se) {
private void handleDataNotification(Notification n) {
if (n.getType() == NotificationType.Deleted) {
- locks.stream()
- .filter(l -> l.getPath().equals(n.getPath()))
- .forEach(l -> l.lockWasInvalidated());
+ for (ResourceLockImpl<T> lock : locks) {
Review comment:
@linlinnn Thanks for your feedback. use `CopyOnWriteArraySet` instead
of `HashSet` is the simpliest way.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]