zhtaoxiang commented on code in PR #10411:
URL: https://github.com/apache/pinot/pull/10411#discussion_r1134736719
##########
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:
(not sure if this is needed) Maybe we need to clean up previously downloaded
files in order to not use up disk space?
##########
pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixInstanceDataManagerConfig.java:
##########
@@ -29,6 +29,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import static org.apache.pinot.common.utils.fetcher.BaseSegmentFetcher.*;
Review Comment:
I think the problem is with the `*`. Maybe you should change your IDE
setting and import each explicitly.
--
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]