Skip to content

Commit

Permalink
fix alias exists check in findings index creation (opensearch-project…
Browse files Browse the repository at this point in the history
…#622) (opensearch-project#623)

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 d7a766e commit 21ce59b
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 21ce59b

Please sign in to comment.