wenbingshen commented on PR #3504:
URL: https://github.com/apache/bookkeeper/pull/3504#issuecomment-1259253606

   > Do you have more evidence about that?
   
   No, I have no other affected scenes.
   I just saw a flaky-test and found during analysis that there is no 
guaranteed order here
   
   > After reading the code, looks like the fragments' usage is unrelated to 
the order.
   > 
   > If we are not percent sure about that, I think we'd better not use the 
LinkedHashSet. That may increase the time complexity.
   
   What time complexity are you talking about?
   You can find some time complexity comparisons of HashSet and LinkedHashSet 
from the following website:
   https://www.baeldung.com/java-collections-complexity
   
   The screenshot below is my local test:
   1000items:
   
![image](https://user-images.githubusercontent.com/35599757/192492817-92fce0ec-6f1c-4adc-a165-5bfae5c7913e.png)
   
   1 billion items:
   
![image](https://user-images.githubusercontent.com/35599757/192492932-f56c114c-f7ad-4283-b756-09557cbb5adb.png)
   
   @zymap PTAL. Thanks.
   


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