dkranchii commented on code in PR #19261:
URL: https://github.com/apache/pinot/pull/19261#discussion_r3806307908


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java:
##########
@@ -1256,9 +1256,13 @@ protected SegmentBuildDescriptor 
buildSegmentInternal(boolean forCommit)
       File indexDir = new File(dataDir, _segmentNameStr);
       FileUtils.deleteQuietly(indexDir);
 
-      File[] tempFiles = tempSegmentFolder.listFiles();
-      assert tempFiles != null;
-      File tempIndexDir = tempFiles[0];
+      File tempIndexDir;

Review Comment:
   Good call — inlined the check and dropped the helper + tests. The production 
path is now just the 6-line null/empty guard that funnels through 
`reportSegmentBuildFailure` before rethrowing `SegmentBuildFailureException`, 
matching the missing-metadata / missing-creation-meta branches a few lines 
further down. No behavior change vs. the previous revision; only the extraction 
is gone.



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