mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
It is not very useful to have: * shardTimeout disabled if requestTimeout is enabled (means infinite es overruns) * shardTimeout > requestTimeout if both enabled (means finite es overruns) * shardTimeout < requestTimeout if both enabled (means partial results from es?) The only option that really makes sense is to have shardTimeout === requestTimeout, so that's what I've done here.
This commit is contained in:
parent
c462488853
commit
9ff0f70953
5 changed files with 9 additions and 6 deletions
|
@ -81,7 +81,7 @@
|
|||
#elasticsearch.customHeaders: {}
|
||||
|
||||
# Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.
|
||||
#elasticsearch.shardTimeout: 0
|
||||
#elasticsearch.shardTimeout: 30000
|
||||
|
||||
# Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying.
|
||||
#elasticsearch.startupTimeout: 5000
|
||||
|
|
|
@ -22,7 +22,7 @@ to this Kibana instance.
|
|||
To send *no* client-side headers, set this value to [] (an empty list).
|
||||
`elasticsearch.requestTimeout:`:: *Default: 30000* Time in milliseconds to wait for responses from the back end or
|
||||
Elasticsearch. This value must be a positive integer.
|
||||
`elasticsearch.shardTimeout:`:: *Default: 0* Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.
|
||||
`elasticsearch.shardTimeout:`:: *Default: 30000* Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.
|
||||
`elasticsearch.ssl.certificate:` and `elasticsearch.ssl.key:`:: Optional settings that provide the paths to the PEM-format SSL
|
||||
certificate and key files. These files are used to verify the identity of Kibana to Elasticsearch and are required when `xpack.ssl.verification_mode` in Elasticsearch is set to either `certificate` or `full`.
|
||||
`elasticsearch.ssl.certificateAuthorities:`:: Optional setting that enables you to specify a list of paths to the PEM file for the certificate
|
||||
|
|
|
@ -32,7 +32,7 @@ export default function (kibana) {
|
|||
preserveHost: boolean().default(true),
|
||||
username: string(),
|
||||
password: string(),
|
||||
shardTimeout: number().default(0),
|
||||
shardTimeout: number().default(30000),
|
||||
requestTimeout: number().default(30000),
|
||||
requestHeadersWhitelist: array().items().single().default(DEFAULT_REQUEST_HEADERS),
|
||||
customHeaders: object().default({}),
|
||||
|
|
|
@ -31,7 +31,8 @@ export function requestFetchParamsToBody(
|
|||
timeFilter,
|
||||
kbnIndex,
|
||||
sessionId,
|
||||
config) {
|
||||
config,
|
||||
esShardTimeout) {
|
||||
const indexToListMapping = {};
|
||||
const timeBounds = timeFilter.getActiveBounds();
|
||||
const promises = requestsFetchParams.map(function (fetchParams) {
|
||||
|
@ -74,6 +75,7 @@ export function requestFetchParamsToBody(
|
|||
type: fetchParams.type,
|
||||
search_type: fetchParams.search_type,
|
||||
ignore_unavailable: true,
|
||||
timeout: esShardTimeout,
|
||||
};
|
||||
if (config.get('courier:setRequestPreference') === 'sessionId') {
|
||||
header.preference = sessionId;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { requestFetchParamsToBody } from './request_fetch_params_to_body';
|
||||
|
||||
export function RequestFetchParamsToBodyProvider(Promise, timefilter, kbnIndex, sessionId, config) {
|
||||
export function RequestFetchParamsToBodyProvider(Promise, timefilter, kbnIndex, sessionId, config, esShardTimeout) {
|
||||
return (requestsFetchParams) => (
|
||||
requestFetchParamsToBody(
|
||||
requestsFetchParams,
|
||||
|
@ -8,6 +8,7 @@ export function RequestFetchParamsToBodyProvider(Promise, timefilter, kbnIndex,
|
|||
timefilter,
|
||||
kbnIndex,
|
||||
sessionId,
|
||||
config)
|
||||
config,
|
||||
esShardTimeout)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue