shauryachats commented on code in PR #18641:
URL: https://github.com/apache/pinot/pull/18641#discussion_r3522781438
##########
pinot-server/src/main/java/org/apache/pinot/server/predownload/PredownloadScheduler.java:
##########
@@ -301,23 +318,25 @@ void downloadSegment(PredownloadSegmentInfo
predownloadSegmentInfo)
throws Exception {
try {
long startTime = System.currentTimeMillis();
- File tempRootDir = getTmpSegmentDataDir(predownloadSegmentInfo);
- if (_instanceDataManagerConfig.isStreamSegmentDownloadUntar()
- && predownloadSegmentInfo.getCrypterName() == null) {
- try {
- // TODO: increase rate limit here
- File untaredSegDir =
downloadAndStreamUntarWithRateLimit(predownloadSegmentInfo, tempRootDir,
-
_instanceDataManagerConfig.getStreamSegmentDownloadUntarRateLimit());
- moveSegment(predownloadSegmentInfo, untaredSegDir);
- } finally {
- FileUtils.deleteQuietly(tempRootDir);
- }
- } else {
- try {
- File tarFile = downloadAndDecrypt(predownloadSegmentInfo,
tempRootDir);
- untarAndMoveSegment(predownloadSegmentInfo, tarFile, tempRootDir);
- } finally {
- FileUtils.deleteQuietly(tempRootDir);
+ try {
+ downloadFromDeepStore(predownloadSegmentInfo);
+ _predownloadMetrics.deepStoreSegmentDownloaded();
+ } catch (Exception e) {
+ if (_peerDownloadEnabled && _peerDownloadScheme != null) {
Review Comment:
Can we move this logic within `downloadFromPeers` so that this check is
always made when `downloadFromPeers` is invoked from some other callsite?
--
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]