Specifying the timeout for the _msearch in the body (#26446) (#26534)

* Specifying the timeout for the msearch in the body

* Revert "Specifying the timeout for the msearch in the body"

This reverts commit 7b07bfa2e6.

* Fixing the courier and the index pattern execute script timeouts
This commit is contained in:
Brandon Kobel 2018-12-03 11:54:58 -08:00 committed by GitHub
parent 138cbc345a
commit a8cad677e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -72,7 +72,10 @@ export function serializeFetchParams(
});
})
.then(function (indexList) {
let body = fetchParams.body || {};
let body = {
timeout: `${esShardTimeout}ms`,
...fetchParams.body || {},
};
let index = [];
// If we've reached this point and there are no indexes in the
// index list at all, it means that we shouldn't expect any indexes
@ -94,7 +97,6 @@ export function serializeFetchParams(
type: fetchParams.type,
search_type: fetchParams.search_type,
ignore_unavailable: true,
timeout: esShardTimeout,
};
if (config.get('courier:setRequestPreference') === 'sessionId') {
header.preference = sessionId;

View file

@ -24,7 +24,6 @@ export const executeScript = async ({ name, lang, script, indexPatternTitle, add
const header = {
index: indexPatternTitle,
ignore_unavailable: true,
timeout: 30000
};
const search = {
@ -40,6 +39,7 @@ export const executeScript = async ({ name, lang, script, indexPatternTitle, add
}
},
size: 10,
timeout: '30s',
};
if (additionalFields.length > 0) {