Lokesh Khurana created PHOENIX-7966:
---------------------------------------

             Summary: Fix flaky HA IT transitClusterRole: expect the settled 
peer role
                 Key: PHOENIX-7966
                 URL: https://issues.apache.org/jira/browse/PHOENIX-7966
             Project: Phoenix
          Issue Type: Sub-task
            Reporter: Lokesh Khurana
            Assignee: Lokesh Khurana


Several HA integration tests intermittently time out (~1 in 5 runs) in 
transitClusterRole when transitioning a group under the FAILOVER policy with 
both clusters live.

The test helper HighAvailabilityTestingUtility.transitClusterRole builds the 
expected ClusterRoleRecord from the role arguments and writes that record to 
both clusters, then waits for the client's refreshed record to equal it. 
Callers requested the peer role STANDBY. But when the local cluster moves to 
ACTIVE_TO_STANDBY (→ ACTIVE_IN_SYNC_TO_STANDBY), the peer's failover-management 
listener autonomously advances as STANDBY peer to STANDBY_TO_ACTIVE. The 
equality wait therefore races that autonomous transition: if the advance lands 
first, the observed record \{ACTIVE_TO_STANDBY, STANDBY_TO_ACTIVE} never equals 
the requested \{ACTIVE_TO_STANDBY, STANDBY}, and the wait times out.


Fix: pass the role each cluster settles at. Naming the peer role 
STANDBY_TO_ACTIVE — a fixed point in the peer/local transition maps — makes the 
helper write the resting state directly, so the refreshed record matches on the 
first poll regardless of listener timing. Deterministic, not timing-dependent.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to