From 80524d5c34393b7ec6f1b35294d882c382a6730b Mon Sep 17 00:00:00 2001 From: Oleg Kravchuk Date: Wed, 25 Oct 2023 22:13:08 +0300 Subject: [PATCH] fixed the ktlint checks. Signed-off-by: Oleg Kravchuk --- .../indexstatemanagement/step/shrink/WaitForShrinkStep.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/shrink/WaitForShrinkStep.kt b/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/shrink/WaitForShrinkStep.kt index d3095641c..33c7fb111 100644 --- a/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/shrink/WaitForShrinkStep.kt +++ b/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/shrink/WaitForShrinkStep.kt @@ -149,10 +149,10 @@ class WaitForShrinkStep(private val action: ShrinkAction) : ShrinkStep(name, tru val response: AcknowledgedResponse = context.client.admin().indices().suspendUntil { aliases(req, it) } if (response.isAcknowledged) { logger.info("Aliases switched successfully from [$sourceIndexName] to [$targetIndexName].") - return true + } else { + logger.error("Switching aliases from [$sourceIndexName] to [$targetIndexName] failed.") } - logger.error("Switching aliases from [$sourceIndexName] to [$targetIndexName] failed.") - return false + response.isAcknowledged } catch (e: Exception) { logger.error("Switching aliases from [$sourceIndexName] to [$targetIndexName] failed due to exception.", e) false