Skip to content

Commit

Permalink
fix alias exists check in findings index creation (#622) (#623)
Browse files Browse the repository at this point in the history
Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
  • Loading branch information
opensearch-trigger-bot[bot] authored and sbcd90 committed Nov 2, 2022
1 parent dd3c801 commit c8c83e8
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 c8c83e8

Please sign in to comment.