exceptionfactory commented on code in PR #6826:
URL: https://github.com/apache/nifi/pull/6826#discussion_r1263118823


##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/WaitNotifyProtocol.java:
##########
@@ -181,39 +185,40 @@ public WaitNotifyProtocol(final 
AtomicDistributedMapCacheClient cache) {
      */
     public Signal notify(final String signalId, final Map<String, Integer> 
deltas, final Map<String, String> attributes)
             throws IOException, ConcurrentModificationException {
+        synchronized (pool.intern(signalId)) {

Review Comment:
   [Synchronizing on an interned 
string](https://stackoverflow.com/questions/1356277/synchronizing-on-an-interned-string)
 is not ideal due potential memory concerns. Some alternative approach that 
uses a ConcurrentMap for tracking operations might be another option.
   
   Although Google Guava is an available dependency, using it should be avoided 
in favor of standard Java collections.



-- 
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]

Reply via email to