Petr Fedchenkov has uploaded this change for review. ( http://gerrit.cloudera.org:8080/25151
Change subject: IMPALA-13399: Don't take the stub lock in subscriber RPC handlers ...................................................................... IMPALA-13399: Don't take the stub lock in subscriber RPC handlers With statestored HA, the standby statestored asks every subscriber in its heartbeats for the state of the connection with the active statestored. StatestoreSubscriber::Heartbeat() answers with GetStatestoreConnState() of the other StatestoreStub, which takes that stub's lock_. RecoveryModeChecker() holds this lock for its whole re-registration loop. So while the active statestored is down and the subscribers try to re-register with it, the heartbeats of the standby statestored time out, and it unregisters every subscriber, catalogds included. When it takes over, it designates the catalogd that re-registers first, which can switch the active catalogd. It also keeps the standby statestored from learning that the subscribers lost the active one, which delays the takeover; which matches the heartbeat timeouts the statestored HA tests saw. GetStatestoreConnState() and IncCountForUpdateStatestoredRoleRPC() no longer take lock_. The failure detector has its own lock, and the counter is atomic. Testing: - Added test_standby_heartbeats_during_subscriber_recovery. It keeps the standby statestored from taking over for 90 s after the active one is killed. Without the fix the standby statestored unregistered the subscribers; with the fix it passed. - Ran test_statestored_ha.py and test_catalogd_ha.py with the core exploration strategy, and all tests passed. Change-Id: I4dfcf768b2b5ebde9e37bd0950e90de383ad8681 Assisted-by: Claude Opus 5.5 (Claude Code) --- M be/src/statestore/statestore-subscriber.cc M tests/custom_cluster/test_statestored_ha.py 2 files changed, 29 insertions(+), 2 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/51/25151/1 -- To view, visit http://gerrit.cloudera.org:8080/25151 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I4dfcf768b2b5ebde9e37bd0950e90de383ad8681 Gerrit-Change-Number: 25151 Gerrit-PatchSet: 1 Gerrit-Owner: Petr Fedchenkov <[email protected]>
