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


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeTableDataManager.java:
##########
@@ -468,6 +468,13 @@ void downloadAndReplaceSegment(String segmentName, 
SegmentZKMetadata segmentZKMe
 
   private void downloadSegmentFromDeepStore(String segmentName, 
IndexLoadingConfig indexLoadingConfig, String uri) {
     File segmentTarFile = new File(_indexDir, segmentName + 
TarGzCompressionUtils.TAR_GZ_FILE_EXTENSION);

Review Comment:
   I see a similar method in BaseTableManager, which does this to prepare a 
temp root dir for downloading and uncompressing etc..
   ```
   File tempRootDir = getTmpSegmentDataDir("tmp-" + segmentName + "-" + 
UUID.randomUUID());
   ```
   
   In RealtimeTableDataManager, it actually also uses this util 
`getTmpSegmentDataDir` but inside `untarAndMoveSegment()` a few lines below. So 
maybe, we make those two places a bit more consistent by creating a tempRootDir.
   
   But to make things robust, inside getTmpSegmentDataDir(), we do the check 
you added here to recreate tmpRootDir if it used to exist.



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