Skip to content

Commit

Permalink
fix alias exists check in findings index creation
Browse files Browse the repository at this point in the history
Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
  • Loading branch information
eirsep committed Oct 25, 2022
1 parent 7546b00 commit db3c403
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 db3c403

Please sign in to comment.