You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/01/25 22:07:52 UTC

[GitHub] erikdubbelboer edited a comment on issue #6912: google-extensions: GoogleStorage.insert occasionally throws; retry?

erikdubbelboer edited a comment on issue #6912: google-extensions: GoogleStorage.insert occasionally throws; retry?
URL: https://github.com/apache/incubator-druid/issues/6912#issuecomment-457744353
 
 
   I see [someone already added retry to various operations](https://github.com/apache/incubator-druid/blob/e1033bb412244fc9dff9dea1c89d43a8e0081fd3/extensions-contrib/google-extensions/src/main/java/org/apache/druid/storage/google/GoogleDataSegmentKiller.java#L69-L77). The same logic could be reused here.
   So change
   https://github.com/apache/incubator-druid/blob/e1033bb412244fc9dff9dea1c89d43a8e0081fd3/extensions-contrib/google-extensions/src/main/java/org/apache/druid/storage/google/GoogleTaskLogs.java#L72
   to
   ```java
         RetryUtils.retry(
             (RetryUtils.Task<Void>) () -> {
               storage.insert(config.getBucket(), taskKey, mediaContent);
               return null;
             },
             GoogleUtils::isRetryable,
             1,
             5
         );
   ```
   
   I haven't done any development on Druid in a long time so I don't have things set up to test this myself right now.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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