fx19880617 commented on a change in pull request #4874: Pinot ingestion job - 
Standalone
URL: https://github.com/apache/incubator-pinot/pull/4874#discussion_r352905565
 
 

 ##########
 File path: 
pinot-ingestion-jobs/pinot-ingestion-common/src/main/java/org/apache/pinot/ingestion/common/DefaultControllerRestApi.java
 ##########
 @@ -121,7 +122,47 @@ public void pushSegments(FileSystem fileSystem, 
List<Path> tarFilePaths) {
             LOGGER.error("Caught exception while pushing segment: {} to 
location: {}, retry {}/{}", segmentName,
                 pushLocation, retry, _retry, e);
             if (retry == _retry) {
-              throw new RuntimeException(String.format("Failed to push segment 
%s to %s with %d retries",segmentName, pushLocation, retry), e);
+              throw new RuntimeException(
+                  String.format("Failed to push segment %s to %s with %d 
retries", segmentName, pushLocation, retry),
+                  e);
+            }
+            try {
+              // Exponential back-off, max sleep time is 64 seconds.
+              Thread.sleep(1000 * (int) Math.pow(2, Math.min(retry + 1, 6)));
 
 Review comment:
   Will remove the dependency from `pinot-ingestion-common` from 
`pinot-standalone`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to