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

Create new handlers for every new request in GoogleCloudStorageService #27339

Merged
merged 1 commit into from
Nov 14, 2017

Conversation

tlrx
Copy link
Member

@tlrx tlrx commented Nov 10, 2017

This pull request 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.

It also add a test for this and removes some unused attributes.

Closes #27092

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
@thkoch2001
Copy link

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);
Copy link
Member

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...

Copy link
Member

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.

Copy link
Member

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...

@tlrx tlrx merged commit dd51c23 into elastic:master Nov 14, 2017
@tlrx
Copy link
Member Author

tlrx commented Nov 14, 2017

Thanks @thkoch2001 and @rjernst

tlrx added a commit that referenced this pull request Nov 14, 2017
#27339)

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 #27092
tlrx added a commit that referenced this pull request Nov 14, 2017
#27339)

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 #27092
tlrx added a commit that referenced this pull request Nov 14, 2017
#27339)

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 #27092
@tlrx tlrx deleted the fix-27092 branch November 14, 2017 11:09
@msahnawaz
Copy link

@tlrx : Will this be available in ES 6.0.1?

@tlrx
Copy link
Member Author

tlrx commented Nov 15, 2017

@msahnawaz Yes, that's what the tag v6.0.1 means when it is assigned to an issue.

martijnvg added a commit that referenced this pull request Nov 15, 2017
* 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)
martijnvg added a commit that referenced this pull request Nov 15, 2017
* 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)
@clintongormley clintongormley added :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs and removed :Plugin Repository GCS labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants