-
Notifications
You must be signed in to change notification settings - Fork 75
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
[Feature/extensions] Remove client #619
[Feature/extensions] Remove client #619
Conversation
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
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.
Great work, only a minor recommendation
@@ -1169,7 +1166,7 @@ private void detectAnomaly( | |||
internalListener, | |||
anomalyResults, | |||
resultIndex, | |||
() -> injectSecurity.close() | |||
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.
Can we remove this parameter?
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.
That was my initial gut feel, as this is the only known usage of that method so it possibly could be removed ...
But the method signature is more general with a CheckedRunnable<?> runBefore
to support chaining result requests. In this particular usage, we aren't chaining a request, so null
terminates the (potential) sequence of Runnables. I figured it does no harm to leave it as is.
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!
Description
This PR removes all dependencies on the Common Utils Thread Context. It was initially used for users and roles, with most of the user code removed in #617. This cleans up the remaining (useless/unused) fetching of the thread context from the code.
The thread context was pulled from the ThreadPool, which is also no longer needed or desired in an extension and has been removed in most code.
There is still a remaining threadpool parameter in the
createComponents()
method which inherits/overridesPlugin
and saves it as a field in the runner object, but it is okay to ignore that and not use it in later code; eventually that will no longer be needed. A thread pool is also part of theClient
constructor and there is athreadpool()
getter from it. While it may be harmless to keep that method around I think having it throw an exception as unused, or be deprecated, would be preferable.Issues Resolved
Fixes opensearch-project/opensearch-sdk-java#22
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.