Skip to content

Commit

Permalink
fix alias exists check in findings index creation (#622)
Browse files Browse the repository at this point in the history
Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
(cherry picked from commit ce79ffd)
  • Loading branch information
eirsep authored and github-actions[bot] committed Oct 25, 2022
1 parent ee9bbc9 commit 6cc44a4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ class AlertIndices(
}
val findingsIndex = dataSources.findingsIndex
val findingsIndexPattern = dataSources.findingsIndexPattern ?: FINDING_HISTORY_INDEX_PATTERN
if (!clusterService.state().routingTable().hasIndex(findingsIndex)) {
if (!clusterService.state().metadata().hasAlias(findingsIndexPattern)) {
createIndex(
findingsIndexPattern,
findingMapping(),
Expand Down

0 comments on commit 6cc44a4

Please sign in to comment.