mihaibudiu commented on code in PR #3567:
URL: https://github.com/apache/calcite/pull/3567#discussion_r1417856456


##########
core/src/main/java/org/apache/calcite/util/ReflectUtil.java:
##########
@@ -450,7 +450,8 @@ E extends Object> ReflectiveVisitDispatcher<R, E> 
createDispatcher(
         Method method = map.get(key);
         if (method == null) {
           if (map.containsKey(key)) {
-            // We already looked for the method and found nothing.
+            // We should get again because it may be putted an object by 
another thread.

Review Comment:
   Does this solve the race or just reduce the window of vulnerability?
   The right way to do this is with some locking mechanism.



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