mariofusco commented on PR #6119:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6119#issuecomment-2411601021

   > These two places iterate over the same HashSet, but due to the 
non-deterministic iteration order of HashSet, they can produce different orders 
during the same execution.
   
   This assumption isn't correct, or better isn't correctly formulated, and 
however it doesn't apply to the specific context where this issue has been 
reported. Let me explain.
   
   It is true that the iteration order of an HashSet is not deterministic, but 
this doesn't mean that it randomically changes at each and every iteration. In 
particular for 2 iterations of the **same unchanged HashSet instance in the 
same JVM execution** it is guaranteed that the iteration order will be the same 
(no matter what it is) and this is enough for the use case that you analyzed.
   
   I believe that this is a case that is not correctly covered by that NonIndex 
tool that you used, so maybe a problem that should be reported and fixed there.
   
   > For instance, while running above test cases, I observed that the 
arguments passed to D.on(var_result, var_$eSet) could be in the order (result, 
$eSet) or ($eSet, result)., which leads to the above compilation error message.
   
   > Based on my understanding, iteration order in a HashSet is inconsistent in 
the same session itself , even within the same VM and even if the HashSet's 
contents aren't modified.
   
   As I wrote I've never seen this failure in any of the thousands of the test 
suite execution that I performed either on our CI environment or on my local 
machines. If you can reproduce it, this means that I'm wrong and I'd be glad to 
have a call so you could show me how to reproduce this issue.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to