-
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
Deprecate xpack and typed endpoints for graph explore api #74230
Changes from 2 commits
601e54d
1fd1987
c84e855
ae65115
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -66,7 +66,10 @@ protected RestController controller() { | |||
protected void dispatchRequest(RestRequest request) { | ||||
FakeRestChannel channel = new FakeRestChannel(request, false, 1); | ||||
ThreadContext threadContext = new ThreadContext(Settings.EMPTY); | ||||
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. no need to create this anymore
Suggested change
|
||||
controller.dispatchRequest(request, channel, threadContext); | ||||
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. this in fact was not really chaning the context used in |
||||
|
||||
try (ThreadContext.StoredContext ignore = verifyingClient.threadPool().getThreadContext().stashContext()) { | ||||
controller.dispatchRequest(request, channel, threadContext); | ||||
} | ||||
} | ||||
|
||||
/** | ||||
|
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.
I wonder if we should not be using the thread context passed over via
AbstractHttpServerTransport#dispatchRequest
The thread pool is first created in node and is the used in both
RestController
andAbstracthttpServerTransport
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.
OOF! Good catch. This is a mistake IMO; we should do one of the following things:
This mainly is just an issue for testing but it is tricky and would be nice if we just had one way to access the value