Lokesh Khurana created PHOENIX-8038:
---------------------------------------
Summary: Remove CLUSTER_ROLE_BASED_MUTATION_BLOCK_ENABLED and
always block mutations in the ACTIVE_TO_STANDBY role
Key: PHOENIX-8038
URL: https://issues.apache.org/jira/browse/PHOENIX-8038
Project: Phoenix
Issue Type: Sub-task
Reporter: Lokesh Khurana
Assignee: Lokesh Khurana
h3. Problem
The property {{phoenix.cluster.role.based.mutation.block.enabled}}
({{CLUSTER_ROLE_BASED_MUTATION_BLOCK_ENABLED}}) controls the mutation block
during a consistent failover. When the local role is {{ACTIVE_TO_STANDBY}},
{{IndexRegionObserver#preBatchMutate}} rejects HA client writes with
{{MutationBlockedIOException}}.
A consistent failover is not correct without this block. If the property is
false, the old active cluster continues to accept writes during the cutover.
Consistent failover deployments always set this property to true. Thus the
property gives no value. It only adds a configuration that can cause an
incorrect failover.
h3. Current code (PHOENIX-7562-feature-new @ c9ea66c177)
* {{QueryServices.java:456}}: the property name.
* {{QueryServicesOptions.java:505}} and {{:650}}: the default value and the
{{setIfUnset}} entry.
* {{HAGroupStoreManager.java:185}}: reads the property into
{{mutationBlockEnabled}}.
* {{HAGroupStoreManager.java:210}}: {{isMutationBlocked()}} returns false when
the property is false.
* {{IndexRegionObserver.java:982}}: the only caller. The exception message
names the property.
* {{MutationBlockedIOException.java:23}}: the Javadoc names the property.
h3. Proposed change
# Remove {{CLUSTER_ROLE_BASED_MUTATION_BLOCK_ENABLED}} from {{QueryServices}}.
# Remove {{DEFAULT_CLUSTER_ROLE_BASED_MUTATION_BLOCK_ENABLED}} and its
{{setIfUnset}} entry from {{QueryServicesOptions}}.
# Remove the {{mutationBlockEnabled}} field from {{HAGroupStoreManager}}.
{{isMutationBlocked()}} always checks the cluster role.
# Update the exception message in {{IndexRegionObserver}} and the Javadoc of
{{MutationBlockedIOException}}. Do not refer to the property.
# Remove the property from these ITs:
{{SyncReplicationRolloutFeatureOnMissingGroupIT}},
{{SyncReplicationRolloutStep1IT}}, {{BypassedMutationBlockMetricsIT}},
{{IndexRegionObserverMutationBlockingIT}}, {{HAGroupMetricsIT}},
{{HAGroupStoreManagerIT}}, {{ParallelPhoenixConnectionIT}}.
# Remove {{HAGroupStoreManagerIT#testMutationBlockDisabled}}. The disabled mode
does not exist after this change.
# Update the class comment in {{SyncReplicationRolloutStep1IT}} (line 54),
which names the property.
h3. Behavior after the change
The block continues to operate only when the
{{SYNCHRONOUS_REPLICATION_ENABLED}} master switch is true. It applies only to
batches that carry {{_HAGroupName}} ({{IndexRegionObserver.java:965}}). Thus a
cluster that does not use consistent failover has no change.
h3. Out of scope
* The {{master}} and {{5.3}} branches. These branches keep the property for the
PHOENIX-7493 graceful failover path.
* {{HA_GROUP_STALE_FOR_MUTATION_CHECK_ENABLED}}.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)