Impala Public Jenkins has submitted this change and it was merged. ( https://gerrit.cloudera.org/25154 )
Change subject: IMPALA-15597: Keep the active catalogd when a statestored restarts ...................................................................... IMPALA-15597: Keep the active catalogd when a statestored restarts With statestored and catalogd HA, each statestored designates the active catalogd from the registrations it receives. A restarted statestored does not know which catalogd is active, so it designates the first catalogd that registers, or the one with the higher priority if both register within --catalogd_ha_preemption_wait_period_ms. Once it becomes active, it sends UpdateCatalogd with its own choice and the active catalogd switches, although the active catalogd was healthy. The new active catalogd may reset its metadata, and DDLs in flight meet a catalogd failover. This patch makes the active catalogd register with force_catalogd_active when it registers with a new statestored instance (a new statestore ID in the GetProtocolVersion response), unless it follows no statestored as active or the one it follows is unreachable, in which case it may have been demoted without knowing it. A re-registration with the same statestored instance, for example after a pause or a network partition, never claims the role. The hidden flag --catalogd_ha_keep_active_on_reregistration (default true) turns this off. Testing: - Added test_active_catalogd_kept_after_statestored_restart. It failed with --catalogd_ha_keep_active_on_reregistration=false (the active catalogd switched) 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: Ifb71b578950086ec38e7bf1102c73024749efb85 Assisted-by: Claude Opus 5.5 (Claude Code) Reviewed-on: https://gerrit.cloudera.org/25154 Reviewed-by: Yida Wu <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M be/src/catalog/catalog-server.cc M be/src/statestore/statestore-subscriber-catalog.cc M be/src/statestore/statestore-subscriber-catalog.h M be/src/statestore/statestore-subscriber.cc M be/src/statestore/statestore-subscriber.h M tests/custom_cluster/test_statestored_ha.py 6 files changed, 110 insertions(+), 6 deletions(-) Approvals: Yida Wu: Looks good to me, approved Impala Public Jenkins: Verified -- To view, visit https://gerrit.cloudera.org/25154 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ifb71b578950086ec38e7bf1102c73024749efb85 Gerrit-Change-Number: 25154 Gerrit-PatchSet: 16 Gerrit-Owner: Petr Fedchenkov <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Petr Fedchenkov <[email protected]> Gerrit-Reviewer: Wenzhe Zhou <[email protected]> Gerrit-Reviewer: Yida Wu <[email protected]>
