klsince commented on code in PR #10158:
URL: https://github.com/apache/pinot/pull/10158#discussion_r1084600387


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/store/SegmentLocalFSDirectory.java:
##########
@@ -248,25 +250,26 @@ protected void load()
 
   private synchronized void loadData()
       throws IOException {
-    if (_columnIndexDirectory != null) {
-      return;
+    if (_columnIndexDirectory == null) {

Review Comment:
   The comment about SegmentDirectory interface suggests that's possible, but 
need to call createReader() to get a new reader. The buffers are not loaded 
redundantly with the null-checks in loadData() method. 
   
   > We only need to add if 
(CollectionUtils.isNotEmpty(_segmentMetadata.getStarTreeV2MetadataList()) {...} 
   
   Then I should close _starTreeIndexReader in Writer.close() method too. I'm 
fine with that way.



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