Skip to content

fix wait for replica inactivity and retry SYSTEM DROP REPLICA#2047

Open
bhardwajparth51 wants to merge 1 commit into
Altinity:0.27.3from
bhardwajparth51:fix-1943-drop-replica-retry
Open

fix wait for replica inactivity and retry SYSTEM DROP REPLICA#2047
bhardwajparth51 wants to merge 1 commit into
Altinity:0.27.3from
bhardwajparth51:fix-1943-drop-replica-retry

Conversation

@bhardwajparth51

Copy link
Copy Markdown

Fixes #1943 where scaling down replicas causes SYSTEM DROP REPLICA to fail with Code: 305, Can't drop replica ... because it's active when executed before ZooKeeper session timeout expires.

  • Extracts ISchemer interface for dependency injection and testability.
  • Adds waitHostReplicaInactive polling until ZooKeeper session expires.
  • Adds retryDropReplica with linear backoff on Code 305 errors.
  • Adds getCoordinatorHost fallback helper for single-replica shard drops.
  • Adds comprehensive unit test suite in worker-deleter_test.go.

Signed-off-by: Parth Bhardwaj 196071556+bhardwajparth51@users.noreply.github.com

Important items to consider before making a Pull Request

  • All commits in the PR are squashed.
  • The PR is made into dedicated next-release branch, not into master branch.
  • The PR is signed.

…PLICA on Code 305 (Altinity#1943)

Fixes issue Altinity#1943 where scaling down replicas causes SYSTEM DROP REPLICA
to fail with Code: 305, Can't drop replica ... because it's active when
executed before ZooKeeper session timeout expires.

- Extracts ISchemer interface for dependency injection and testability.
- Adds waitHostReplicaInactive polling until ZooKeeper session expires.
- Adds retryDropReplica with linear backoff on Code 305 errors.
- Adds getCoordinatorHost fallback helper for single-replica shard drops.
- Adds comprehensive unit test suite in worker-deleter_test.go.

Signed-off-by: Parth Bhardwaj <196071556+bhardwajparth51@users.noreply.github.com>
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.

1 participant