mnpoonia commented on code in PR #7575:
URL: https://github.com/apache/hbase/pull/7575#discussion_r2647609291


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestModifyTableProcedure.java:
##########
@@ -698,4 +699,72 @@ public void testModifyWillNotReopenRegions() throws 
IOException {
       assertTrue(e.getMessage().contains("Can not modify REGION_REPLICATION"));
     }
   }
+
+  @Test
+  public void testModifyTableWithCoprocessorAndColumnFamilyPropertyChange() 
throws IOException {
+    // HBASE-29706 - This test validates the fix for the bug where modifying 
only column family
+    // properties
+    // (like COMPRESSION) with REOPEN_REGIONS=false would incorrectly throw an 
error when
+    // coprocessors are present. The bug was caused by comparing collection 
hash codes
+    // instead of actual descriptor content, which failed when HashMap 
iteration order varied.
+
+    final boolean reopenRegions = false;
+    final TableName tableName = TableName.valueOf(name.getMethodName());
+    final ProcedureExecutor<MasterProcedureEnv> procExec = 
getMasterProcedureExecutor();
+
+    MasterProcedureTestingUtility.createTable(procExec, tableName, null, "cf");
+
+    // Step 1: Add a coprocessor to the table
+    TableDescriptor htd = UTIL.getAdmin().getDescriptor(tableName);
+    TableDescriptor descriptorWithCoprocessor =
+      
TableDescriptorBuilder.newBuilder(htd).setCoprocessor(CoprocessorDescriptorBuilder
+        
.newBuilder(SimpleRegionObserver.class.getName()).setPriority(100).build()).build();

Review Comment:
   Thanks @Umeshkumar9414 . Added second coproc to make test robust.



-- 
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