-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[filebeat][gcs] - Added support for retry config #41862
Conversation
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
|
…removed changes that resulted for an earlier merge
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
This pull request doesn't have a |
/test |
CHANGELOG.next.asciidoc
Outdated
- Added support for retry config in GCS input. {issue}11580[11580] {pull}41862[41862] | ||
|
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.
- Added support for retry config in GCS input. {issue}11580[11580] {pull}41862[41862] | |
- Added support for retry configuration in GCS input. {issue}11580[11580] {pull}41862[41862] |
[float] | ||
==== `retry` | ||
|
||
This attribute can be used to configure a list of sub attributes that directly control how the input should behave when a download for a file/object fails or gets interrupted. The list of sub attributes are as follows :- |
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.
This attribute can be used to configure a list of sub attributes that directly control how the input should behave when a download for a file/object fails or gets interrupted. The list of sub attributes are as follows :- | |
This attribute can be used to configure a list of sub attributes that directly control how the input should behave when a download for a file/object fails or gets interrupted. |
Also suggest a <ul> rather than an <ol> since the ordering of the properties does not matter.
This attribute can be used to configure a list of sub attributes that directly control how the input should behave when a download for a file/object fails or gets interrupted. The list of sub attributes are as follows :- | ||
|
||
1. `max_attempts`: This attribute defines the maximum number of retry attempts(including the initial api call) that should be attempted for a retryable error. The default value for this is `3`. | ||
2. `initial_backoff_duration`: This attribute defines the initial backoff time in seconds. The default value for this is `1s`. |
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.
2. `initial_backoff_duration`: This attribute defines the initial backoff time in seconds. The default value for this is `1s`. | |
2. `initial_backoff_duration`: This attribute defines the initial backoff time. The default value for this is `1s`. |
This is a time.Duration
and has a unit awareness. Perhaps note this rather than saying that it's in seconds. Also below.
bucket_timeout: 10m | ||
---- | ||
|
||
While configuring the `retry` attribute, the user should take into consideration the `bucket_timeout` value. The `retry` attribute should be configured in such a way that the retries are completed within the `bucket_timeout` window. If the `retry` attribute is configured in such a way that the retries are not completed successfully within the `bucket_timeout` window, then the input will suffer a `context timeout` for that specific object/file which it was retrying. This can cause gaps in ingested data to pile up over time. |
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.
While configuring the `retry` attribute, the user should take into consideration the `bucket_timeout` value. The `retry` attribute should be configured in such a way that the retries are completed within the `bucket_timeout` window. If the `retry` attribute is configured in such a way that the retries are not completed successfully within the `bucket_timeout` window, then the input will suffer a `context timeout` for that specific object/file which it was retrying. This can cause gaps in ingested data to pile up over time. | |
When configuring the `retry` attribute, the user should consider the `bucket_timeout` value. The `retry` attribute should be configured in such a way that the retries are completed within the `bucket_timeout` window. If the `retry` attribute is configured in such a way that the retries are not completed successfully within the `bucket_timeout` window, the input will suffer a `context timeout` for that specific object/file which it was retrying. This can cause gaps in ingested data to pile up over time. |
x-pack/filebeat/input/gcs/config.go
Outdated
@@ -126,5 +141,11 @@ func defaultConfig() config { | |||
PollInterval: 5 * time.Minute, | |||
BucketTimeOut: 120 * time.Second, | |||
ParseJSON: false, | |||
Retry: retryConfig{ | |||
MaxAttempts: 3, | |||
InitialBackOffDuration: 1 * time.Second, |
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.
InitialBackOffDuration: 1 * time.Second, | |
InitialBackOffDuration: time.Second, |
This pull request is now in conflicts. Could you fix it? 🙏
|
@efd6, I've addressed the PR suggestions. |
- `max_backoff_duration`: This attribute defines the maximum backoff time. The default value for this is `30s`. | ||
- `backoff_multiplier`: This attribute defines the backoff multiplication factor. The default value for this is `2`. | ||
|
||
NOTE: Attributes such as `initial_backoff_duration` and `max_backoff_duration` can be defined in the following formats: `{{x}}s`, `{{x}}m`, `{{x}}h`, here `s = seconds`, `m = minutes` and `h = hours`. The value `{{x}}` can be anything we wish. |
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.
I think something simpler like "NOTE: The initial_backoff_duration
and max_backoff_duration
attributes must have time units. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
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.
Updated
- `max_backoff_duration`: This attribute defines the maximum backoff time. The default value for this is `30s`. | ||
- `backoff_multiplier`: This attribute defines the backoff multiplication factor. The default value for this is `2`. | ||
|
||
NOTE: The `initial_backoff_duration` and `max_backoff_duration` attributes must have time units. Valid time units are `ns`, `us (or µs)`, `ms`, `s`, `m`, `h` |
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.
NOTE: The `initial_backoff_duration` and `max_backoff_duration` attributes must have time units. Valid time units are `ns`, `us (or µs)`, `ms`, `s`, `m`, `h` | |
NOTE: The `initial_backoff_duration` and `max_backoff_duration` attributes must have time units. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. |
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.
Committed this
Co-authored-by: Dan Kortschak <[email protected]>
* Added support for retry config along with necessary documentation and tests (cherry picked from commit 3f51793)
* Added support for retry config along with necessary documentation and tests (cherry picked from commit 3f51793) Co-authored-by: ShourieG <[email protected]>
Type of change
Proposed commit message
NOTE
Ignore the commit history as this resulted separating this PR from an earlier PR and the subsequent merges that occurred to keep the changes consistent across.
Checklist
- [ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Disruptive User Impact
Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs