-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Default to _search instead of _msearch in courier #45174
Conversation
💔 Build Failed |
Pinging @elastic/kibana-app-arch |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
@@ -63,7 +62,7 @@ export function createProxy(server) { | |||
body | |||
}, { signal }); | |||
} catch (error) { | |||
throw handleESError(error); |
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.
This was changed in a previous PR I did, but the _search
behavior is only used in two places (courier and querying matching index patterns), and both rely on the behavior of not throwing, but simply returning the response from ES.
it('calls es.msearch() once, regardless of number of searchRequests', () => { | ||
expect(fakeSearch.callCount).to.be(0); | ||
searchRequests = [ createSearchRequest(), createSearchRequest(), createSearchRequest() ]; | ||
|
||
return callClient(searchRequests).then(() => { | ||
expect(fakeSearch.callCount).to.be(1); | ||
}); | ||
}); | ||
|
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.
Not the case any more with _search
.
@@ -45,7 +45,9 @@ describe('callClient', () => { | |||
const { source: overrideSource, ...rest } = overrides; | |||
|
|||
const source = { | |||
_flatten: () => ({}), | |||
_flatten: () => Promise.resolve({ |
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.
In general these changes are mostly to get the tests passing for this PR, they are completely replaced anyway in this PR: #45235
@elasticmachine merge upstream |
💚 Build Succeeded |
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, pull down and loaded a dashboard with one of every sample vis. Seemed to work well!
Just needs release notes.
@elasticmachine merge upstream |
💚 Build Succeeded |
* Default to _search instead of _msearch in courier * Fix callClient tests * Revert accidental commit * Fix proxy to properly return response from ES
7.x (7.5.0): cf414a8 |
This PR just switches the default for
courier:batchSearches
to befalse
.In practice this means that the default will be to use
_search
instead of_msearch
in Elasticsearch by default. It paves the way to make more significant refactorings in courier and search source.Release Note
The default setting for
courier:batchSearches
is nowfalse
, which means that search requests will use the_search
Elasticsearch endpoint rather than_msearch
. Dashboard panels will load individually, and search requests will terminate when users navigate away or update the query.