Skip to content

Commit

Permalink
Adding exception message in failed status error message
Browse files Browse the repository at this point in the history
Signed-off-by: Nishant Goel <[email protected]>
  • Loading branch information
nisgoel-amazon committed Jun 21, 2023
1 parent 3c5187c commit 40b9eee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class TransportReplicateIndexClusterManagerNodeAction @Inject constructor(transp
val replicationState = (t.state as IndexReplicationState?)?.state
replicationState == ReplicationState.FOLLOWING ||
(!replicateIndexReq.waitForRestore && replicationState == ReplicationState.RESTORING) ||
(!replicateIndexReq. waitForRestore && replicationState == ReplicationState. FAILED)
(!replicateIndexReq.waitForRestore && replicationState == ReplicationState.FAILED)
}

listener.onResponse(AcknowledgedResponse(true))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -828,12 +828,8 @@ open class IndexReplicationTask(id: Long, type: String, action: String, descript
}
} catch(e: Exception) {
val err = "Unable to initiate restore call for $followerIndexName from $leaderAlias:${leaderIndex.name}"
val aliasErrMsg = "cannot rename index [${leaderIndex.name}] into [$followerIndexName] because of conflict with an alias with the same name"
log.error(err, e)
if (e.message!!.contains(aliasErrMsg)) {
return FailedState (Collections.emptyMap(), aliasErrMsg)
}
return FailedState(Collections.emptyMap(), err)
return FailedState(Collections.emptyMap(), e.message!!)
}
cso.waitForNextChange("remote restore start") { inProgressRestore(it) != null }
return RestoreState
Expand Down

0 comments on commit 40b9eee

Please sign in to comment.