Skip to content

Commit

Permalink
configure stalled stream protection (#5301)
Browse files Browse the repository at this point in the history
  • Loading branch information
trinity-1686a authored Aug 28, 2024
1 parent 948329b commit 60368df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions quickwit/quickwit-aws/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use std::time::Duration;

use aws_config::retry::RetryConfig;
use aws_config::stalled_stream_protection::StalledStreamProtectionConfig;
use aws_config::BehaviorVersion;
pub use aws_smithy_async::rt::sleep::TokioSleep;
use aws_smithy_runtime::client::http::hyper_014::HyperClientBuilder;
Expand Down Expand Up @@ -63,6 +64,7 @@ pub async fn get_aws_config() -> &'static aws_config::SdkConfig {
.build(https_connector);

aws_config::defaults(BehaviorVersion::v2024_03_28())
.stalled_stream_protection(StalledStreamProtectionConfig::enabled().build())
.http_client(hyper_client)
// Currently handle this ourselves so probably best for now to leave it as is.
.retry_config(RetryConfig::disabled())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ async fn create_s3_client(s3_storage_config: &S3StorageConfig) -> S3Client {
s3_config.set_http_client(aws_config.http_client());
s3_config.set_retry_config(aws_config.retry_config().cloned());
s3_config.set_sleep_impl(aws_config.sleep_impl());
s3_config.set_stalled_stream_protection(aws_config.stalled_stream_protection());
s3_config.set_timeout_config(aws_config.timeout_config().cloned());

if let Some(endpoint) = s3_storage_config.endpoint() {
Expand Down

0 comments on commit 60368df

Please sign in to comment.