-
Notifications
You must be signed in to change notification settings - Fork 20
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
Updated reload_connections set false by default in in_opensearch.rb #140
Open
OlehPalanskyi
wants to merge
4
commits into
fluent:main
Choose a base branch
from
OlehPalanskyi:main
base: main
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
4 commits
Select commit
Hold shift + click to select a range
0927d62
Updated retry stage and change parameter reload_connections set false
OlehPalanskyi c316df6
updated login message when get error EOFError (EOFError)
OlehPalanskyi 982356e
Updated reload_connections set false by default in in_opensearch.rb
OlehPalanskyi 0c7bc0d
Merge branch 'fluent:main' into main
OlehPalanskyi 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
This file contains 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 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 |
---|---|---|
|
@@ -64,7 +64,7 @@ class UnrecoverableRequestFailure < Fluent::UnrecoverableError; end | |
config_param :repeat, :bool, :default => true | ||
config_param :http_backend, :enum, list: [:excon, :typhoeus], :default => :excon | ||
config_param :request_timeout, :time, :default => 5 | ||
config_param :reload_connections, :bool, :default => true | ||
config_param :reload_connections, :bool, :default => false | ||
config_param :reload_on_failure, :bool, :default => false | ||
config_param :resurrect_after, :time, :default => 60 | ||
config_param :reload_after, :integer, :default => DEFAULT_RELOAD_AFTER | ||
|
@@ -215,7 +215,7 @@ def reachable_host?(host) | |
host: ["#{host[:scheme]}://#{host[:host]}:#{host[:port]}"], | ||
user: host[:user], | ||
password: host[:password], | ||
reload_connections: @reload_connections, | ||
# reload_connections: @reload_connections, | ||
request_timeout: @request_timeout, | ||
resurrect_after: @resurrect_after, | ||
reload_on_failure: @reload_on_failure, | ||
|
@@ -343,14 +343,18 @@ def update_retry_state(error=nil) | |
@retry = retry_state(@retry_randomize) | ||
end | ||
@retry.step | ||
if error.message.include?('EOFError (EOFError)') | ||
log.error("Restart plugin because hit error #{error.message}") | ||
exit(1) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. exit(1) caused entire termination. This is brutal manner for handling this exception. :( |
||
end | ||
#Raise error if the retry limit has been reached | ||
raise "Hit limit for retries. retry_times: #{@retry.steps}, error: #{error.message}" if @retry.limit? | ||
#Retry if the limit hasn't been reached | ||
log.warn("failed to connect or search.", retry_times: @retry.steps, next_retry_time: @retry.next_time.round, error: error.message) | ||
sleep(@retry.next_time - Time.now) | ||
else | ||
unless @retry.nil? | ||
log.debug("retry succeeded.") | ||
log.info("retry succeeded.") | ||
@retry = nil | ||
end | ||
end | ||
|
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.
Hey, could you describe why this line is commented out?
Would you mind if you revive this line?