lokiore opened a new pull request, #2649:
URL: https://github.com/apache/phoenix/pull/2649

   ### What changes were proposed in this pull request?
   
   This PR is for the **Consistent Failover feature branch** 
(`PHOENIX-7562-feature-new`). It removes 
`CLUSTER_ROLE_BASED_MUTATION_BLOCK_ENABLED` 
(`phoenix.cluster.role.based.mutation.block.enabled`). HA client mutations are 
now always blocked when the local cluster role is `ACTIVE_TO_STANDBY`.
   
   - `QueryServices` / `QueryServicesOptions`: the property, its default and 
its `setIfUnset` entry are removed.
   - `HAGroupStoreManager#isMutationBlocked(String)` always checks the cluster 
role. The `mutationBlockEnabled` field is removed.
   - `IndexRegionObserver#preBatchMutate`: only the comment and the 
`MutationBlockedIOException` message change. The new message names the HA 
group. The client finds this exception by its type, not by its message. The 
gate around the check does not change:
     - It runs only when `SYNCHRONOUS_REPLICATION_ENABLED` is true.
     - It applies only to `CLIENT_HA` batches (batches that have 
`_HAGroupName`).
     - `SYSTEM.HA_GROUP` writes are exempt.
   - The property is removed from 7 ITs. 
`HAGroupStoreManagerIT#testMutationBlockDisabled` is removed, because the 
disabled mode no longer exists.
   
   ### Why are the changes needed?
   
   A consistent failover is not correct without the `ACTIVE_TO_STANDBY` block. 
If the property is false, the old active cluster continues to accept writes 
during the cutover. Consistent failover deployments always set the property to 
true. Thus the property gives no value, and it adds one more configuration that 
can cause an incorrect failover.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, on this feature branch only:
   - The property is removed. If an old configuration still sets the property, 
Phoenix ignores it.
   - A cluster that does not set the property, but runs with 
`SYNCHRONOUS_REPLICATION_ENABLED=true`, now blocks HA client writes during 
`ACTIVE_TO_STANDBY`. Before this change, that cluster accepted the writes.
   - For deployments that set the property to true, nothing changes.
   
   ### How was this patch tested?
   
   Test counts are read from the surefire/failsafe reports.
   - Unit tests: `HighAvailabilityUtilTest`, 
`HaFailoverExceptionInheritanceTest`, `HAGroupStoreRecordTest`, 
`IndexRegionObserverReplayTest`, `IndexRegionObserverReplicationLogGroupTest` 
and `ReplicationLogGroupTest` all pass (148 tests, 1 skip that was there before 
this change).
   - ITs that pass:
     - `HAGroupStoreManagerIT` (18)
     - `IndexRegionObserverMutationBlockingIT` (6)
     - `BypassedMutationBlockMetricsIT` (1)
     - `SyncReplicationRolloutStep1IT` (1)
     - `SyncReplicationRolloutFeatureOnMissingGroupIT` (1)
     - `HAGroupMetricsIT` (6)
     - `ParallelPhoenixConnectionIT` (19, with 2 assumption skips)
     - `FailoverPhoenixConnectionIT` (23)
     - `FailoverPhoenixConnection2IT` (13, with 1 `@Ignore`)
   - I searched the ITs for a test that depends on the old `false` default: a 
test that writes through an HA connection during `ACTIVE_TO_STANDBY` and 
expects the write to succeed. I found none.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 5.5)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to