You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "zhtaoxiang (via GitHub)" <gi...@apache.org> on 2023/03/20 04:38:26 UTC

[GitHub] [pinot] zhtaoxiang commented on a diff in pull request #10445: Replace HashMap with LinkedHashMap to avoid flaky tests

zhtaoxiang commented on code in PR #10445:
URL: https://github.com/apache/pinot/pull/10445#discussion_r1141614529


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentIndexCreationDriverImpl.java:
##########
@@ -175,7 +175,7 @@ public void init(SegmentGeneratorConfig config, SegmentCreationDataSource dataSo
 
     // Initialize index creation
     _segmentIndexCreationInfo = new SegmentIndexCreationInfo();
-    _indexCreationInfoMap = new HashMap<>();
+    _indexCreationInfoMap = new LinkedHashMap<>();

Review Comment:
   Thanks for working on this!
   
   I have some questions:
   1. Is the only goal to fix flaky tests?
   2. HashMap and LinkedHashMap have different performance on different operations. Changing HashMap to LinkedHashMap may slow down the index creation. This may be a problem it the index creation is slowed down too much. Did you try to compare the performance and can you share the results if you did?



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org