From b10bd037348b3ee056176e8cb9057d66e948a750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20C=C3=B4t=C3=A9?= Date: Tue, 26 May 2020 09:00:31 -0400 Subject: [PATCH] Auto expand replicas for event log (#67286) --- x-pack/plugins/event_log/server/es/documents.test.ts | 2 +- x-pack/plugins/event_log/server/es/documents.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/event_log/server/es/documents.test.ts b/x-pack/plugins/event_log/server/es/documents.test.ts index c08d0ac978bc9..2feb6e3b84f91 100644 --- a/x-pack/plugins/event_log/server/es/documents.test.ts +++ b/x-pack/plugins/event_log/server/es/documents.test.ts @@ -24,7 +24,7 @@ describe('getIndexTemplate()', () => { const indexTemplate = getIndexTemplate(esNames); expect(indexTemplate.index_patterns).toEqual([esNames.indexPatternWithVersion]); expect(indexTemplate.settings.number_of_shards).toBeGreaterThanOrEqual(0); - expect(indexTemplate.settings.number_of_replicas).toBeGreaterThanOrEqual(0); + expect(indexTemplate.settings.auto_expand_replicas).toBe('0-1'); expect(indexTemplate.settings['index.lifecycle.name']).toBe(esNames.ilmPolicy); expect(indexTemplate.settings['index.lifecycle.rollover_alias']).toBe(esNames.alias); expect(indexTemplate.mappings).toMatchObject({}); diff --git a/x-pack/plugins/event_log/server/es/documents.ts b/x-pack/plugins/event_log/server/es/documents.ts index 91b3db554964f..0dc7301568207 100644 --- a/x-pack/plugins/event_log/server/es/documents.ts +++ b/x-pack/plugins/event_log/server/es/documents.ts @@ -13,7 +13,7 @@ export function getIndexTemplate(esNames: EsNames) { index_patterns: [esNames.indexPatternWithVersion], settings: { number_of_shards: 1, - number_of_replicas: 1, + auto_expand_replicas: '0-1', 'index.lifecycle.name': esNames.ilmPolicy, 'index.lifecycle.rollover_alias': esNames.alias, },