Skip to content

PHOENIX-7988 Idle co-active RegionServer stays wedged in STORE_AND_FORWARD, pinning the group at ACTIVE_NOT_IN_SYNC - #2600

Open
tkhurana wants to merge 1 commit into
apache:PHOENIX-7562-feature-newfrom
tkhurana:PHOENIX-7988
Open

PHOENIX-7988 Idle co-active RegionServer stays wedged in STORE_AND_FORWARD, pinning the group at ACTIVE_NOT_IN_SYNC#2600
tkhurana wants to merge 1 commit into
apache:PHOENIX-7562-feature-newfrom
tkhurana:PHOENIX-7988

Conversation

@tkhurana

Copy link
Copy Markdown
Contributor

A co-active RS in STORE_AND_FORWARD promotes back to SYNC_AND_FORWARD via processNoMoreRoundsLeft only when the caught-up guard passes. That guard scanned the next round's shard, which is a shared directory holding every co-active RS's live OPENFORWRITE rotation writer, so an idle or out-claimed RS never saw it empty and stayed pinned in STORE_AND_FORWARD, wedging the group at ACTIVE_NOT_IN_SYNC indefinitely.

Split the guard: the RS's own mode flip is gated only on an empty in-progress directory (the per-RS forward-health signal), while the shared in-sync status claim keeps the full caught-up guard. The mode flip is self-validating since SyncAndForwardModeImpl.onEnter must reach the peer, so an optimistic promotion against a dead peer bounces back to STORE_AND_FORWARD.

Adds a VisibleForTesting tracker-injecting constructor and three focused tests covering the wedge fix, the peer-down backlog case (no promotion), and the fully-caught-up case.

…RWARD, pinning the group at ACTIVE_NOT_IN_SYNC

A co-active RS in STORE_AND_FORWARD promotes back to SYNC_AND_FORWARD via
processNoMoreRoundsLeft only when the caught-up guard passes. That guard scanned
the next round's shard, which is a shared directory holding every co-active RS's
live OPENFORWRITE rotation writer, so an idle or out-claimed RS never saw it
empty and stayed pinned in STORE_AND_FORWARD, wedging the group at
ACTIVE_NOT_IN_SYNC indefinitely.

Split the guard: the RS's own mode flip is gated only on an empty in-progress
directory (the per-RS forward-health signal), while the shared in-sync status
claim keeps the full caught-up guard. The mode flip is self-validating since
SyncAndForwardModeImpl.onEnter must reach the peer, so an optimistic promotion
against a dead peer bounces back to STORE_AND_FORWARD.

Adds a VisibleForTesting tracker-injecting constructor and three focused tests
covering the wedge fix, the peer-down backlog case (no promotion), and the
fully-caught-up case.
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