Tanuj Khurana created PHOENIX-8029:
--------------------------------------

             Summary: Make the replication mode-switch notification non-blocking
                 Key: PHOENIX-8029
                 URL: https://issues.apache.org/jira/browse/PHOENIX-8029
             Project: Phoenix
          Issue Type: Sub-task
            Reporter: Tanuj Khurana
            Assignee: Tanuj Khurana


_*ReplicationLogGroup.checkAndSetModeAndNotify*_ wakes the Disruptor event 
handler by calling the blocking sync(). It runs on the ZooKeeper cache-event 
thread (the ACTIVE_IN_SYNC and ACTIVE_NOT_IN_SYNC state listeners) and on the 
forwarder thread. That sync() can block for up to the replication sync timeout 
(WAL sync timeout plus ZK session timeout), which stalls HA state notifications 
for the group, and it an abort the RegionServer from a ZK or forwarder thread.
Fix: publish a non-blocking MODE_CHECK marker with RingBuffer.tryNext(), as the 
rotation SWAP marker does. The handler applies the switch on the marker when no 
syncs are pending and the current batch is empty; otherwise it applies at the 
next sync point. A closed group doesn't apply switches requested by other 
threads during the close() drain.



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

Reply via email to