Petr Fedchenkov has posted comments on this change. ( https://gerrit.cloudera.org/25153 )
Change subject: IMPALA-15575: Choose the active statestored from the current stub state ...................................................................... Patch Set 11: 1. Yes, this can ignore a valid active status, and your question exposes a real trade-off. The versions are host-local UnixMicros() election stamps, so comparing them across statestoreds assumes their clocks are roughly in sync: a skew larger than the failover detection window (not just a minutes-scale step-back) makes the newly elected statestored announce a version below the one the subscriber already knows, and the guard ignores it. If the old active then stays down, the subscriber keeps following it until it returns, a later election stamps higher, or the subscriber restarts — there is no self-correction. Before this change a release build applied such a switch (silently regressing the version) and a debug build crashed on the DCHECK; this change makes both ignore-and-log instead, which is safer against the stale-resumed statestored the patch targets but strands the skew case. The clean hardening is statestored-side: carry the active version in the HA heartbeat and stamp a promotion as max(UnixMicros(), known peer version + 1) — then even a skewed winner re-announces with a version the guard accepts. I can file that as a follow-up. 2. That is intended. ReconcileRoles only corrects the subscriber's local view; a failover switch lands either in UpdateStatestoredRole(), which stamps the grace period, or (racing it right after a re-registration) in this swap — where the corrected-to stub just went through recovery (its num-connection-failures > 0), so the disconnect branch of the same grace period covers the window either way. -- To view, visit https://gerrit.cloudera.org/25153 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4f0c999a0eb4c8049b97223aba902dd55da708f0 Gerrit-Change-Number: 25153 Gerrit-PatchSet: 11 Gerrit-Owner: Petr Fedchenkov <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Petr Fedchenkov <[email protected]> Gerrit-Reviewer: Yida Wu <[email protected]> Gerrit-Comment-Date: Thu, 19 Nov 2026 17:34:03 +0000 Gerrit-HasComments: No
