ritegarg commented on code in PR #2198:
URL: https://github.com/apache/phoenix/pull/2198#discussion_r2162251672
##########
phoenix-core-server/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java:
##########
@@ -540,8 +541,9 @@ public void
preBatchMutate(ObserverContext<RegionCoprocessorEnvironment> c,
final Configuration conf = c.getEnvironment().getConfiguration();
final HAGroupStoreManager haGroupStoreManager =
HAGroupStoreManager.getInstance(conf);
if (haGroupStoreManager.isMutationBlocked()) {
- throw new IOException("Blocking Mutation as Some CRRs are in
ACTIVE_TO_STANDBY "
- + "state and CLUSTER_ROLE_BASED_MUTATION_BLOCK_ENABLED
is true");
+ throw new MutationBlockedIOException("Blocking Mutation as Some
CRRs "
Review Comment:
IMO, this is more specific. There can be multiple CRRs. Current logic is
that even if one of the CRR is in ATS state we block the mutation. Currently
this means that cluster itself is in CRR state but in future if we can identify
traffic based on HAGroup(or CRR) we can selectively block mutations for that
HAGroup as well.
--
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]