[Backport 2.19] Clear Stale Persistent Tasks in Stop/Pause API#1677
Open
opensearch-trigger-bot[bot] wants to merge 1 commit into
Open
[Backport 2.19] Clear Stale Persistent Tasks in Stop/Pause API#1677opensearch-trigger-bot[bot] wants to merge 1 commit into
opensearch-trigger-bot[bot] wants to merge 1 commit into
Conversation
* Stab at Fixing integ tests Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Revert "Stab at Fixing integ tests" This reverts commit 0e4b126. Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Stab at Fixing integ tests Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Fixing CVE-2026-25645 and CVE-2026-24400 Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Adding validation in resume replication and stop replication api should clear all stale replication metadata Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Fixing StopReplicationIT Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Fixing SecurityCustomRolesIT and SingleClusterSanityIT Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Adding integ tests for test start replication is blocked when replication is already running, test start replication succeeds after stop cleans up, test idempotent stop replication can be called multiple times and test stop replication cleans up and allows restart Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Eliminating race condition between waitForClusterStateUpdate and removeReplicationTasksFromClusterState function Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Modifying test delete follower index when leader index is unavailable Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Removing try catch from stop api whereever not needed Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Adding ITs in Stop and StartReplicationITs Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Fix stale persistent task cleanup in stop/start/resume APIs to prevent orphaned tasks from blocking replication restart Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Remove duplicacy for validation in TransportReplicateIndexClusterManagerNodeAction.kt Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Addressing comments Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Using StaleTaskUtils.removeStaleTasksForIndex instead of removeStaleReplicationTasksFromClusterState in STOP api Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Fixing deletion of follower index when leader index is deleted Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Fixing deletion of follower index when leader index is deleted Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Fixing follower index automated deletion when leader index is deleted + Clear all unassigned tasks Clear assigned tasks only if the task is not present in task manager or the assigned node is invalid Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Adding UTs for StaleTaskUtils.kt file Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Removing duplicate ITs from StartReplicationIT Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Removing duplicate ITs from StartReplicationIT Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Throw IllegalStateException for active running tasks during stale task cleanup instead of post-validation Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Throw IllegalStateException for active running tasks during stale task cleanup instead of post-validation Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Add removeAllTasksForIndex for Start API to clean up all tasks and revert removeStaleTasksForIndex to skip active tasks so Stop API no longer throws on running tasks Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Remove redundant validateNoActiveMetadata in Start API and duplicate stale task cleanup logging in Resume API Signed-off-by: Mohit Kumar <mohitamg@amazon.com> * Use removeAllTasksForIndex in Resume API to ensure clean slate before creating new tasks Signed-off-by: Mohit Kumar <mohitamg@amazon.com> --------- Signed-off-by: Mohit Kumar <mohitamg@amazon.com> Co-authored-by: Mohit Kumar <mohitamg@amazon.com> (cherry picked from commit 7d5be63)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport 7d5be63 from #1629