Petr Fedchenkov has uploaded this change for review. ( http://gerrit.cloudera.org:8080/25152
Change subject: IMPALA-15596: Match a statestored ID exactly before the wildcard ...................................................................... IMPALA-15596: Match a statestored ID exactly before the wildcard With statestored HA, a StatestoreStub that has not registered yet has a zero statestore ID, and IsMatchingStatestoreId() treats a zero ID as a match for any statestored. If a subscriber starts while its first configured statestored is down, the unregistered stub of that statestored takes the heartbeats and UpdateStatestoredRole RPCs of the other one. The registered stub then misses its heartbeats, enters recovery mode every subscriber timeout, and every recovery swaps the active and standby statestoreds of the subscriber. While the subscriber follows the standby statestored, it gets no topic or catalogd updates. This patch applies the zero-ID wildcard only while a RegisterSubscriber RPC of the stub is in flight, when an RPC can arrive before the registration response. An exact ID match on the other stub wins over the wildcard (IsStubFor()). The hidden flag --statestore_subscriber_ha_role_checks (default true) turns the check off. Without statestored HA nothing changes. Testing: - Added test_subscriber_started_while_first_statestored_down. It failed with --statestore_subscriber_ha_role_checks=false (3 role swaps in 10 s) and passed 4 times with the fix. - Ran test_statestored_ha.py and test_catalogd_ha.py with the core exploration strategy, and all tests passed. Change-Id: Ieeacdaccd4ab58c37337f8413cbd4e27637c743e Assisted-by: Claude Opus 5.5 (Claude Code) --- M be/src/statestore/statestore-subscriber.cc M be/src/statestore/statestore-subscriber.h M tests/custom_cluster/test_statestored_ha.py 3 files changed, 108 insertions(+), 9 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/52/25152/1 -- To view, visit http://gerrit.cloudera.org:8080/25152 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ieeacdaccd4ab58c37337f8413cbd4e27637c743e Gerrit-Change-Number: 25152 Gerrit-PatchSet: 1 Gerrit-Owner: Petr Fedchenkov <[email protected]>
