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

Default to _search instead of _msearch in courier #45174

Merged
merged 8 commits into from
Oct 14, 2019

Conversation

lukasolson
Copy link
Member

@lukasolson lukasolson commented Sep 9, 2019

This PR just switches the default for courier:batchSearches to be false.

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 now false, 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.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@@ -63,7 +62,7 @@ export function createProxy(server) {
body
}, { signal });
} catch (error) {
throw handleESError(error);
Copy link
Member Author

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.

Comment on lines -153 to -161
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);
});
});

Copy link
Member Author

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({
Copy link
Member Author

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

@lukasolson lukasolson requested a review from a team October 2, 2019 21:32
@lukasolson lukasolson self-assigned this Oct 2, 2019
@lukasolson lukasolson added Feature:Search Querying infrastructure in Kibana review v7.5.0 v8.0.0 labels Oct 2, 2019
@stacey-gammon
Copy link
Contributor

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@stacey-gammon stacey-gammon left a 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.

@lukasolson
Copy link
Member Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@lukasolson lukasolson merged commit 6383a4b into elastic:master Oct 14, 2019
lukasolson added a commit to lukasolson/kibana that referenced this pull request Oct 14, 2019
* Default to _search instead of _msearch in courier

* Fix callClient tests

* Revert accidental commit

* Fix proxy to properly return response from ES
@lukasolson
Copy link
Member Author

7.x (7.5.0): cf414a8

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.

3 participants