-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Create new handlers for every new request in GoogleCloudStorageService #27339
Conversation
This commit changes the DefaultHttpRequestInitializer in order to make it create new HttpIOExceptionHandler and HttpUnsuccessfulResponseHandler for every new HTTP request instead of reusing the same two handlers for all requests. Closes elastic#27092
I have no dev environment to test me, but the code lgtm. Thank you. |
@@ -47,13 +65,56 @@ GoogleCredential getDefaultCredential() throws IOException { | |||
} | |||
}; | |||
assertSame(cred, service.getCredential("default")); | |||
|
|||
service.new DefaultHttpRequestInitializer(cred, null, null); |
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.
Is this a typo? Not sure how this compiles...
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.
It's a non-static inner class, that's the syntax for constructing an instance of an inner class that is tied to an instance of the outer class.
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.
Ahhh, it's been a long time since I have seen this syntax...
Thanks @thkoch2001 and @rjernst |
@tlrx : Will this be available in ES 6.0.1? |
@msahnawaz Yes, that's what the tag |
* es/master: Logging: Unify log rotation for index/search slow log (#27298) wildcard query on _index (#27334) REST spec: Validate that api name matches file name that contains it (#27366) Revert "Reduce synchronization on field data cache" Create new handlers for every new request in GoogleCloudStorageService (#27339) Rest test fixes (#27354)
* es/6.x: Updated 6.0.0 release notes to include all changes from alpha, beta, RC wildcard query on _index (#27334) REST spec: Validate that api name matches file name that contains it (#27366) Revert "Reduce synchronization on field data cache" Create new handlers for every new request in GoogleCloudStorageService (#27339) Rest test fixes (#27354)
This pull request changes the
DefaultHttpRequestInitializer
in order to makeit create new
HttpIOExceptionHandler
andHttpUnsuccessfulResponseHandler
for every new HTTP request instead of reusing the same two handlers for
all requests.
It also add a test for this and removes some unused attributes.
Closes #27092