Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gracefully fail replication on bootstrap failure. #166

Merged
merged 1 commit into from
Sep 17, 2021

Conversation

krishna-ggk
Copy link
Collaborator

Gracefully fail replication on bootstrap failure.

While at it, also support Stopping FAILED index (mainly cleanup) and
handle FAILED state in other actions.

Signed-off-by: Gopala Krishna Ambareesh [email protected]

Check List

  • New functionality includes testing. (Manually tested as we don't have primitives to simulate failed replication)
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@@ -178,9 +181,11 @@ class TransportStopIndexReplicationAction @Inject constructor(transportService:
?:
throw IllegalArgumentException("No replication in progress for index:${request.indexName}")
val replicationOverallState = replicationStateParams[REPLICATION_LAST_KNOWN_OVERALL_STATE]
if (replicationOverallState == ReplicationOverallState.RUNNING.name)
if (replicationOverallState == ReplicationOverallState.PAUSED.name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on previous logic, this should return true in "Pause" state?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, just realized and updated.

While at it, also support Stopping FAILED index (mainly cleanup) and
handle FAILED state in other actions.

Signed-off-by: Gopala Krishna Ambareesh <[email protected]>
@krishna-ggk krishna-ggk merged commit d95faac into opensearch-project:main Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants