-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix(aws_S3 source): Add timeout for aws operations. #25873
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
Open
petere-datadog
wants to merge
12
commits into
master
Choose a base branch
from
peter.ehik/aws-read-timeout
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
212946f
fix(aws_s3 source): bound S3 GetObject with default client timeouts
taylorchandleryoung efc4dd3
Merge branch 'master' of github.com:vectordotdev/vector into peter.eh…
petere-datadog 644e4cd
fix(aws_s3 source): log S3 object key on processing errors
petere-datadog 9fcfa4d
remove this enhancement.md file
petere-datadog 273a0fd
add timeout settings
petere-datadog 55ace27
remove uneeded logging
petere-datadog ff1d80e
no-op
petere-datadog a1b6b01
feat(aws): add client timeout settings to remaining AWS-backed compon…
petere-datadog f2814ae
Merge branch 'master' of github.com:vectordotdev/vector into peter.eh…
petere-datadog 6b19b96
chore(changelog): consolidate AWS timeout changelog fragments
petere-datadog 4ef846b
update changelog description
petere-datadog f531ef2
fixed changelog
petere-datadog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
changelog.d/aws_s3_source_log_processing_error_key.enhancement.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| The `aws_s3` source now logs an error containing the S3 object key whenever it fails to process an S3 event (e.g. a `GetObject` failure, a decode error, or a downstream acknowledgement error), making it easier to identify which object failed without cross-referencing SQS message IDs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| The `aws_s3` source now bounds its S3 `GetObject` requests with default client timeouts (`connect_timeout_seconds = 5`, `read_timeout_seconds = 30`) and exposes them as configuration options. Previously the S3 client was created without a read or operation timeout, so a half-open or silently dropped connection — for example one reaped by a NAT gateway idle timeout — could hang a polling task indefinitely, stalling SQS-based S3 ingestion until the process was restarted. The `read_timeout` applies per-read, so slow but steadily progressing transfers of large objects are not cut off. Any dimension can be overridden (or an operation timeout added) via `connect_timeout_seconds`, `read_timeout_seconds`, and `operation_timeout_seconds` on the source. | ||
|
|
||
| authors: taylorchandleryoung |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question is this default value how the code behaved previously? If not then maybe we would consider doing nothing if the optional is not filled. Many other integrations do this instead of falling back to a hardcoded default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the default value before was 3.1 seconds https://github.com/awslabs/aws-sdk-rust/blob/33a43d1891b5ae5f5c3ed83343193967c7e01446/sdk/aws-smithy-runtime/src/client/defaults.rs#L38 now we're setting it to 5 seconds. Read timeout wasn't set at all so we're setting it to 30seconds which I think is a good default, cause if the connection is stuck, i.e we've connected but no data is coming across then we shouldn't hang indefinitely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm i see. This can go down two paths either:
If we go with (1) then my previous suggestion works. If (2) then I think the conventional way to do this in vector is with the #[serde(default) = "xyz"] configurable component tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright made a larger update, looks like a lot but it's all kinda samey, decided to add timeouts to all the other AWS integrations as well.