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

Feat: Added retry_count and retry_delay config #218

Merged
merged 4 commits into from
Feb 7, 2020

Conversation

kares
Copy link
Contributor

@kares kares commented Feb 5, 2020

initially wanted to filter out specific errors that make sense to get retried (e.g. only rescue-ing Aws::S3::Errors::ServiceError and inspecting error.code) but possibilities are wild.

resolves #216 (also closes #169)

retry
if tries < @retry_count
tries += 1
logger.warn("Uploading failed, retrying (#{tries}).", :exception => e.class, :message => e.message, :path => file.path, :backtrace => e.backtrace)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as retry logging seems to "annoy" users I decreased logger.level to warn
(and added a new error message when retrying is done)
but users not configuring retry_count will only see logging downgraded to warn level.
if that is a potential problem and we should keep error level here, I am fine to do that ...

@elasticsearch-bot elasticsearch-bot self-assigned this Feb 6, 2020
Copy link
Member

@jsvd jsvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a minor suggestion in the error log entry, and it's missing the gemspec version bump, otherwise LGTM

lib/logstash/outputs/s3/uploader.rb Outdated Show resolved Hide resolved
@kares kares merged commit 2efde25 into logstash-plugins:master Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allow opting out from infinite upload retries Limit retry interval
3 participants