tustvold commented on code in PR #5806:
URL: https://github.com/apache/arrow-rs/pull/5806#discussion_r1617656372
##########
object_store/src/client/retry.rs:
##########
@@ -368,21 +399,29 @@ impl RetryExt for reqwest::RequestBuilder {
}
}
- fn send_retry(self, config: &RetryConfig) -> BoxFuture<'static,
Result<Response>> {
- let request = self.retryable(config);
- Box::pin(async move { request.send().await })
+ fn send_retry(self, ctx: &RequestContext) -> BoxFuture<'static,
Result<Response>> {
+ let request = self.retryable(&ctx.config);
+ let semaphore = Arc::clone(&ctx.semaphore);
+ Box::pin(async move {
+ let permit = semaphore.acquire_owned().await.unwrap();
Review Comment:
Hmm... Thinking about this a bit more, there is a slight challenge that the
semaphore needs to outlive any response streaming. It may be that send_retry
needs to return a `Response` that holds the permit or something... :thinking:
This might not be such an easy change :sweat_smile:
--
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]