You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "jasperjiaguo (via GitHub)" <gi...@apache.org> on 2023/05/18 20:47:36 UTC

[GitHub] [pinot] jasperjiaguo commented on a diff in pull request #10777: Redefine the semantics of SEGMENT_STREAMED_DOWNLOAD_UNTAR_FAILURES metric to count individual segment fetch failures.

jasperjiaguo commented on code in PR #10777:
URL: https://github.com/apache/pinot/pull/10777#discussion_r1198288230


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java:
##########
@@ -628,13 +628,16 @@ private File downloadAndStreamUntarWithRateLimit(String segmentName, SegmentZKMe
         maxStreamRateInByte);
     String uri = zkMetadata.getDownloadUrl();
     try {
-      File ret = SegmentFetcherFactory.fetchAndStreamUntarToLocal(uri, tempRootDir, maxStreamRateInByte);
-      LOGGER.info("Download and untarred segment: {} for table: {} from: {}", segmentName, _tableNameWithType, uri);
-      return ret;
-    } catch (AttemptsExceededException e) {
-      LOGGER.error("Attempts exceeded when stream download-untarring segment: {} for table: {} from: {} to: {}",
-          segmentName, _tableNameWithType, uri, tempRootDir);
-      _serverMetrics.addMeteredTableValue(_tableNameWithType, ServerMeter.SEGMENT_STREAMED_DOWNLOAD_UNTAR_FAILURES, 1L);
+        File ret = SegmentFetcherFactory.fetchAndStreamUntarToLocal(uri, tempRootDir, maxStreamRateInByte);
+        LOGGER.info("Downloaded and untarred segment: {} for table: {} from: {}", segmentName, _tableNameWithType, uri);
+        return ret;
+    } catch (Exception e) {

Review Comment:
   Hey @jugomezv, I might miss something here, but if our purpose here is to add to a metric every time a download-untar fails, then adding to the counter here in this catch block will not capture all the failures? If we want to have best observability and capture all the failures that happens even in the attempts, should we do that in https://github.com/apache/pinot/blob/2050376adcb67041972d9707b338373a5e6bc468/pinot-common/src/main/java/org/apache/pinot/common/utils/fetcher/HttpSegmentFetcher.java#L109



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org