Petr Fedchenkov created IMPALA-15798:
----------------------------------------

             Summary: Catalogd HA: a claim arriving after the preemption-window 
expiry switches the active catalogd back
                 Key: IMPALA-15798
                 URL: https://issues.apache.org/jira/browse/IMPALA-15798
             Project: IMPALA
          Issue Type: Bug
          Components: Catalog, Backend
            Reporter: Petr Fedchenkov


With statestored and catalogd HA, a restarted statestored does not know which
catalogd was active. After {{catalogd_ha_preemption_wait_period_ms}} (default
10 s) expires without registrations, it designates the next catalogd that
registers. If the original active catalogd was unreachable for longer than
the window (a long pause, a partition, the statestored restarting under it),
it still believes it is active and claims the role on registration, switching
the active catalogd back. The result is two switches (designation, then
claim-back), and the second may reset metadata under in-flight DDLs.

IMPALA-15597 tried suppressing such late claims (Gerrit 25154 patch sets
11-12), but the auto-claim and the operator flag {{force_catalogd_active}}
share the same request field, so the suppression also ignored operator-forced
registrations, narrowing the flag's documented semantics. It was reverted
(patch set 13); the late-arrival behavior is unchanged from before
IMPALA-15597.

Proposed direction: add a separate field to the catalogd registration
request, set only by the {{force_catalogd_active}} gflag, so the statestored
can distinguish operator intent from the auto-claim and suppress only the
latter against expiry-made designations. The reverted implementation and its
test {{test_late_claim_ignored_after_preemption_window}} can be reused. Open
questions: whether a late claim should always defer to the designation or win
after a longer grace period, and whether
{{catalogd_ha_preemption_wait_period_ms=0}} deployments need a different
policy.

Repro: pause the active catalogd longer than the window while the statestored
restarts; the standby registers first and is designated after the expiry;
resume the original active — it claims the role back (two switches).

Related: IMPALA-15597, IMPALA-12507.




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to