-
Notifications
You must be signed in to change notification settings - Fork 24.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
RestClient: on retry timeout add root exception #25576
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
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.
LGTM, will kick of a CI build before merging this.
can we have a test for this? |
I just realized that a better fix might be to move |
hi @Timshel I think I prefer the original fix that you proposed. the timeout calls |
From what I understand calling first If we take two different scenario (with multiple available nodes in both case) :
With no fix the result look like :
With the current PR fix the resulting IOException look like :
If the
At first I thought always having the exceptions in suppressed might be better, but after writing it, I think always having the exception of the last call in So in the end I think the current PR is better (Sorry for the complications :). |
hey @Timshel thanks for the explanation. I think we are in agreement, but I have another question: when the retry timeout is set to I am also considering changing the behaviour here to rely solely on socket and connect timeout from the underlying http client for the first attempt, without having the maxRetryTimeout affect it. retry timeout instead should kick from the second attempt on. What do you think about this? |
When the retry is set to 0, the exception is the initial error. In my exemple I'm not sure I understand, if by first attempt you mean first retry then I don't believe it's possible because |
Is there anything blocking the merge of this PR ? |
@javanna, I think this one is at least missing a test. Maybe it needs to change in some way based on the conversation you had above? Can you comment? |
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
* master: (13592 commits) Add docs on replicating APM Server or Beats indices (elastic#36333) [ILM] [DOCS] add general info about steps (elastic#36081) Deprecate types in termvector and mtermvector requests. (elastic#36182) [DOCS] Add missing anchors (elastic#36288) Remove license state listeners on closables (elastic#36308) Adding additional tests for agg parsing in datafeedconfig (elastic#36261) TEST: Reenable RemoveCorruptedShardDataCommandIT.testCorruptIndex Add comments about need for explicit cast Introduce `zen2` discovery type (elastic#36298) [Zen2] Storage layer WriteStateException propagation (elastic#36052) Fix line length offenders in the o.e.search package. (elastic#36223) [Tests] Fix third party tests with Gradle 5.0 (elastic#36302) Help Eclipse with type inference for functions (elastic#36301) Docs: Add password keystore setting for email account passwords (elastic#33409) SNAPSHOT: Increase Timeout to Stabilize Test (elastic#36294) Fix get certificates HLRC API (elastic#36198) Avoid shutting down the only master (elastic#36272) Fix typo in comment Fix total hits serialization of the search response (elastic#36290) Fix FullClusterRestartIT#testRollupIDSchemeAfterRestart ...
@elasticmachine test this please |
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.
LGTM. I don't think adding a test here is necessary, we don't add tests everywhere that we catch and rewrap an exception.
Thanks @Timshel. Sorry the delay in seeing this one integrated. |
* elastic/6.x: (37 commits) [HLRC] Added support for Follow Stats API (elastic#36253) Exposed engine must have all ops below gcp during rollback (elastic#36159) TEST: Always enable soft-deletes in ShardChangesTests Use delCount of SegmentInfos to calculate numDocs (elastic#36323) Add soft-deletes upgrade tests (elastic#36286) Remove LocalCheckpointTracker#resetCheckpoint (elastic#34667) Option to use endpoints starting with _security (elastic#36379) [CCR] Restructured QA modules (elastic#36404) RestClient: on retry timeout add root exception (elastic#25576) [HLRC] Add support for put privileges API (elastic#35679) HLRC: Add rollup search (elastic#36334) Explicitly recommend to forceMerge before freezing (elastic#36376) Rename internal repository actions to be internal (elastic#36377) Core: Remove parseDefaulting from DateFormatter (elastic#36386) [ML] Prevent stack overflow while copying ML jobs and datafeeds (elastic#36370) Docs: Fix Jackson reference (elastic#36366) [ILM] Fix issue where index may not yet be in 'hot' phase (elastic#35716) Undeprecate /_watcher endpoints (elastic#36269) Docs: Fix typo in bool query (elastic#36350) HLRC: Add delete template API (elastic#36320) ...
No description provided.