Lokesh Khurana created PHOENIX-8025:
---------------------------------------

             Summary: Skip consistent-failover log replication for PARALLEL HA 
groups on the active cluster
                 Key: PHOENIX-8025
                 URL: https://issues.apache.org/jira/browse/PHOENIX-8025
             Project: Phoenix
          Issue Type: Sub-task
            Reporter: Lokesh Khurana
            Assignee: Lokesh Khurana


On the PHOENIX-7562 feature branch, IndexRegionObserver#getReplicationLogGroup 
decides whether a mutation batch that carries an HA group name is written to 
the consistent-failover replication log and shipped to the peer cluster. It 
checks the HA policy only when the local cluster is not active for the group:

* Active cluster, any policy: the batch goes to the ReplicationLogGroup and is 
synchronously written to the peer's replication log.
* Non-active cluster, PARALLEL: the batch is committed locally and not shipped.
* Non-active cluster, FAILOVER: the batch is rejected (split-brain guard).

A PARALLEL HA group does not need this replication. The client writes every 
mutation to both clusters, and PARALLEL tables are expected to have HBase 
native replication to keep the clusters converged. Shipping the active's 
PARALLEL writes through the replication log as well means:

* Each PARALLEL write on the active waits for an extra synchronous write to the 
peer's file system before it returns.
* The standby applies every write three times: the client's own write, HBase 
native replication, and the replication-log replay.
* PARALLEL groups pick up the replication log's failure modes. For example, a 
failure writing to the peer's file system can make the region server fail-stop, 
even though PARALLEL never relies on the log.

Testing on a pair of clusters with the feature branch deployed showed this 
directly: the active cluster's ReplicationLogGroup for a PARALLEL group 
appended every client write (1,049 and 651 appends on two region servers), and 
the standby replayed 1,268 replication-log files for that group, on top of the 
client's direct writes and HBase native replication



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

Reply via email to