wchevreuil commented on code in PR #6448:
URL: https://github.com/apache/hbase/pull/6448#discussion_r2098043688
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ModifyTableProcedure.java:
##########
@@ -506,14 +506,17 @@ private void
removeReplicaColumnsIfNeeded(MasterProcedureEnv env) throws IOExcep
private void assignNewReplicasIfNeeded(MasterProcedureEnv env) throws
IOException {
final int oldReplicaCount =
unmodifiedTableDescriptor.getRegionReplication();
final int newReplicaCount = modifiedTableDescriptor.getRegionReplication();
- if (newReplicaCount <= oldReplicaCount) {
+ int existingReplicasCount = env.getAssignmentManager().getRegionStates()
+ .getRegionsOfTable(modifiedTableDescriptor.getTableName()).size();
+ if (newReplicaCount <= Math.min(oldReplicaCount, existingReplicasCount)) {
Review Comment:
Got it, yeah it seems we need to check for differences between the two descs
and zk.
--
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]