heatclub commented on code in PR #10411:
URL: https://github.com/apache/pinot/pull/10411#discussion_r1136185082


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java:
##########
@@ -667,6 +683,36 @@ File untarAndMoveSegment(String segmentName, File tarFile, 
File tempRootDir)
     }
   }
 
+  @VisibleForTesting
+  File untarAndMoveSegmentWithRetries(String segmentName, File tarFile, File 
tempRootDir, SegmentZKMetadata zkMetadata)
+      throws AttemptsExceededException {
+    AtomicReference<File> file = new AtomicReference<>();
+    try {
+      file.set(untarAndMoveSegment(segmentName, tarFile, tempRootDir));
+    } catch (Exception e) {
+      try {
+        RetryPolicies.exponentialBackoffRetryPolicy(_retryCount, _retryWaitMs, 
_retryDelayScaleFactor).attempt(() -> {
+          try {
+            File retriedTarFile = downloadAndDecrypt(segmentName, zkMetadata, 
tempRootDir);

Review Comment:
   Thanks, that is a valid observation.
   I am now deleting the retriedTarFile in finally block.



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