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 2d82a563ed PHOENIX-7831 PhoenixQueryTimeoutIT wait for
DelayedRegionObserver to load (#2448)
2d82a563ed is described below
commit 2d82a563ed28c3850b1e9f67310022d3ff09bfa8
Author: Andrew Purtell <[email protected]>
AuthorDate: Tue Jun 30 15:55:29 2026 -0700
PHOENIX-7831 PhoenixQueryTimeoutIT wait for DelayedRegionObserver to load
(#2448)
---
.../apache/phoenix/iterate/PhoenixQueryTimeoutIT.java | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git
a/phoenix-core/src/it/java/org/apache/phoenix/iterate/PhoenixQueryTimeoutIT.java
b/phoenix-core/src/it/java/org/apache/phoenix/iterate/PhoenixQueryTimeoutIT.java
index ffd0bbaf25..98724c8dc6 100644
---
a/phoenix-core/src/it/java/org/apache/phoenix/iterate/PhoenixQueryTimeoutIT.java
+++
b/phoenix-core/src/it/java/org/apache/phoenix/iterate/PhoenixQueryTimeoutIT.java
@@ -43,6 +43,7 @@ import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.coprocessor.ObserverContext;
import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
import org.apache.hadoop.hbase.coprocessor.SimpleRegionObserver;
+import org.apache.hadoop.hbase.regionserver.HRegion;
import org.apache.phoenix.coprocessorclient.BaseScannerRegionObserverConstants;
import org.apache.phoenix.end2end.NeedsOwnMiniClusterTest;
import org.apache.phoenix.end2end.ParallelStatsDisabledIT;
@@ -191,6 +192,22 @@ public class PhoenixQueryTimeoutIT extends
ParallelStatsDisabledIT {
DelayedRegionObserver.setDelay(5);
// Add delay on the server so that the query times out
TestUtil.addCoprocessor(conn, tableName, DelayedRegionObserver.class);
+ // modifyTable updates the master descriptor but region servers reopen
+ // asynchronously. Poll until the coprocessor is actually loaded.
+ final TableName tn = TableName.valueOf(tableName);
+ getUtility().waitFor(10000, 100, () -> {
+ List<HRegion> regions = getUtility().getHBaseCluster().getRegions(tn);
+ if (regions.isEmpty()) {
+ return false;
+ }
+ for (HRegion region : regions) {
+ if (region.getCoprocessorHost().findCoprocessor(
+ DelayedRegionObserver.class.getName()) == null) {
+ return false;
+ }
+ }
+ return true;
+ });
// Do not let BaseResultIterators throw Timeout Exception Let
ScanningResultIterator handle
// it.
BaseResultIterators.setForTestingSetTimeoutToMaxToLetQueryPassHere(true);