From 0f3f0b131d0c86e0f131d9d7683012e04c7a4380 Mon Sep 17 00:00:00 2001 From: Albert <26584478+albertteoh@users.noreply.github.com> Date: Sat, 27 Feb 2021 03:25:50 +1100 Subject: [PATCH] Better variable for archive suffix (#2854) Signed-off-by: albertteoh --- plugin/storage/es/spanstore/reader.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/storage/es/spanstore/reader.go b/plugin/storage/es/spanstore/reader.go index ca6e3d249de5..bbf46789b71e 100644 --- a/plugin/storage/es/spanstore/reader.go +++ b/plugin/storage/es/spanstore/reader.go @@ -141,14 +141,14 @@ type sourceFn func(query elastic.Query, nextTime uint64) *elastic.SearchSource func getTimeRangeIndexFn(archive, useReadWriteAliases bool) timeRangeIndexFn { if archive { - var archivePrefix string + var archiveSuffix string if useReadWriteAliases { - archivePrefix = archiveReadIndexSuffix + archiveSuffix = archiveReadIndexSuffix } else { - archivePrefix = archiveIndexSuffix + archiveSuffix = archiveIndexSuffix } return func(indexName, indexDateLayout string, startTime time.Time, endTime time.Time) []string { - return []string{archiveIndex(indexName, archivePrefix)} + return []string{archiveIndex(indexName, archiveSuffix)} } } if useReadWriteAliases {