This is an automated email from the ASF dual-hosted git repository.
palashc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/master by this push:
new 510c8a7f9b PHOENIX-7578 : Fix CDCStreamIT tests with region merges
(#2104)
510c8a7f9b is described below
commit 510c8a7f9b07be42c244bcb7b9fa484a5d949adb
Author: Palash Chauhan <[email protected]>
AuthorDate: Thu Apr 10 11:51:56 2025 -0700
PHOENIX-7578 : Fix CDCStreamIT tests with region merges (#2104)
Co-authored-by: Palash Chauhan
<[email protected]>
---
phoenix-core/src/it/java/org/apache/phoenix/end2end/CDCStreamIT.java | 2 ++
phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CDCStreamIT.java
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CDCStreamIT.java
index 98dd22f535..5061efe31b 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CDCStreamIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CDCStreamIT.java
@@ -445,6 +445,8 @@ public class CDCStreamIT extends CDCBaseIT {
.map(HRegionLocation::getRegion)
.map(RegionInfo::getEncodedName)
.collect(Collectors.toList()));
+ // compact to remove merge qualifier from merged regions i.e. clear
references to parents
+ TestUtil.doMajorCompaction(conn, tableName);
// merge the two regions
regions = TestUtil.getAllTableRegions(conn, tableName);
TestUtil.mergeTableRegions(conn, tableName, regions.stream()
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java
b/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java
index 5576fcc216..784e8439f3 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java
@@ -1533,7 +1533,7 @@ public class TestUtil {
.toArray(byte[][]::new);
executeHBaseTableRegionOperation(conn, tableName, (admin,
regionLocator, nRegions) -> {
- admin.mergeRegionsAsync(regionsToMerge, true);
+ admin.mergeRegionsAsync(regionsToMerge, true).get();
waitForRegionChange(regionLocator, nRegions);
});
}