Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable stalled stream protection in s3 client #925

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/temp-branch-build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Branch - Build and push docker image
on:
push:
branches:
- "feat/even-odd-import-from-s3"
- "chore/increase-stalled-stream-protection"

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
Expand Down
8 changes: 7 additions & 1 deletion iris-mpc/src/bin/server.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#![allow(clippy::needless_range_loop)]

use aws_config::retry::RetryConfig;
use aws_sdk_s3::{config::Builder as S3ConfigBuilder, Client as S3Client};
use aws_sdk_s3::{
config::{Builder as S3ConfigBuilder, StalledStreamProtectionConfig},
Client as S3Client,
};
use aws_sdk_sns::{types::MessageAttributeValue, Client as SNSClient};
use aws_sdk_sqs::{config::Region, Client};
use axum::{response::IntoResponse, routing::get, Router};
Expand Down Expand Up @@ -688,7 +691,10 @@ async fn server_main(config: Config) -> eyre::Result<()> {

// Increase S3 retries to 5
let retry_config = RetryConfig::standard().with_max_attempts(5);

let s3_config = S3ConfigBuilder::from(&shared_config)
// disable stalled stream protection to avoid panics during s3 import
.stalled_stream_protection(StalledStreamProtectionConfig::disabled())
.retry_config(retry_config)
.build();
let s3_client = Arc::new(S3Client::from_conf(s3_config));
Expand Down
Loading