yupeng9 commented on code in PR #10400:
URL: https://github.com/apache/pinot/pull/10400#discussion_r1132994256


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManager.java:
##########
@@ -941,16 +942,20 @@ protected SegmentBuildDescriptor 
buildSegmentInternal(boolean forCommit) {
           TimeUnit.MILLISECONDS.toSeconds(waitTimeMillis));
 
       if (forCommit) {
-        File segmentTarFile = new File(dataDir, _segmentNameStr + 
TarGzCompressionUtils.TAR_GZ_FILE_EXTENSION);
-        try {
-          TarGzCompressionUtils.createTarGzFile(indexDir, segmentTarFile);
-        } catch (IOException e) {
-          String errorMessage =
-              String.format("Caught exception while taring index directory 
from: %s to: %s", indexDir, segmentTarFile);
-          _segmentLogger.error(errorMessage, e);
-          _realtimeTableDataManager
-              .addSegmentError(_segmentNameStr, new SegmentErrorInfo(now(), 
errorMessage, e));
-          return null;
+        File segmentTarFile = null;
+        if 
(!_tableConfig.getValidationConfig().isSegmentUploadToDeepStoreDisabled()) {
+          segmentTarFile = new File(dataDir, _segmentNameStr + 
TarGzCompressionUtils.TAR_GZ_FILE_EXTENSION);
+          try {
+            TarGzCompressionUtils.createTarGzFile(indexDir, segmentTarFile);
+          } catch (IOException e) {
+            String errorMessage =
+                String.format("Caught exception while taring index directory 
from: %s to: %s", indexDir, segmentTarFile);
+            _segmentLogger.error(errorMessage, e);
+            _realtimeTableDataManager.addSegmentError(_segmentNameStr, new 
SegmentErrorInfo(now(), errorMessage, e));
+            return null;

Review Comment:
   then it shall not return?



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