You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by vj...@apache.org on 2026/06/30 23:13:31 UTC
(phoenix) branch 5.2 updated (2a86ecae1e -> 88498b1e24)
This is an automated email from the ASF dual-hosted git repository.
virajjasani pushed a change to branch 5.2
in repository https://gitbox.apache.org/repos/asf/phoenix.git
from 2a86ecae1e Preparing phoenix release 5.2.2RC4; tagging and updates to CHANGES.md and RELEASENOTES.md
new 6b17164778 PHOENIX-7827 TableSnapshotReadsMapReduceIT per-test unique snapshot name (#2444)
new f0c6449ab9 PHOENIX-7947 GlobalConnectionTenantTableIT NPE when auto-unboxing (#2558)
new 3355260ef0 PHOENIX-7822 MaxConcurrentConnectionsIT poll for async connection counts (#2439)
new 038ae08dc5 PHOENIX-7825 ConcurrentMutationsIT make MyClock.shouldAdvance volatile (#2442)
new 8480406e30 PHOENIX-7826 MetadataGetTableReadLockIT wait for coprocessor swap to land (#2443)
new cc7e2a4a32 PHOENIX-7830 De-flake MutableIndexFailureIT (#2447)
new b5132815eb PHOENIX-7831 PhoenixQueryTimeoutIT wait for DelayedRegionObserver to load (#2448)
new 88498b1e24 PHOENIX-7952 UpsertSelectIT is flaky due to a connection leak check using a global counter (#2561)
The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../org/apache/phoenix/jdbc/PhoenixConnection.java | 8 +++++++-
.../phoenix/end2end/ConcurrentMutationsIT.java | 2 +-
.../end2end/MetadataGetTableReadLockIT.java | 20 ++++++++++++++++++++
.../end2end/TableSnapshotReadsMapReduceIT.java | 22 ++++++++++++----------
.../org/apache/phoenix/end2end/UpsertSelectIT.java | 19 +++++++++++++++++--
.../end2end/index/MutableIndexFailureIT.java | 5 ++---
.../phoenix/iterate/PhoenixQueryTimeoutIT.java | 17 +++++++++++++++++
.../phoenix/query/MaxConcurrentConnectionsIT.java | 10 +++++++++-
8 files changed, 85 insertions(+), 18 deletions(-)
(phoenix) 07/08: PHOENIX-7831 PhoenixQueryTimeoutIT wait for DelayedRegionObserver to load (#2448)
Posted by vj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
virajjasani pushed a commit to branch 5.2
in repository https://gitbox.apache.org/repos/asf/phoenix.git
commit b5132815eb125607bf4b361cd9d6444a970dc503
Author: Andrew Purtell <ap...@apache.org>
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);
(phoenix) 03/08: PHOENIX-7822 MaxConcurrentConnectionsIT poll for async connection counts (#2439)
Posted by vj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
virajjasani pushed a commit to branch 5.2
in repository https://gitbox.apache.org/repos/asf/phoenix.git
commit 3355260ef0376c82fc27971df75e1ffed66a46be
Author: Andrew Purtell <ap...@apache.org>
AuthorDate: Tue Jun 30 15:48:27 2026 -0700
PHOENIX-7822 MaxConcurrentConnectionsIT poll for async connection counts (#2439)
---
.../org/apache/phoenix/query/MaxConcurrentConnectionsIT.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/query/MaxConcurrentConnectionsIT.java b/phoenix-core/src/it/java/org/apache/phoenix/query/MaxConcurrentConnectionsIT.java
index 860344550d..5223af32ed 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/query/MaxConcurrentConnectionsIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/query/MaxConcurrentConnectionsIT.java
@@ -120,6 +120,12 @@ public class MaxConcurrentConnectionsIT extends BaseTest {
if (conn != null) {
conn.close();
}
+ // Connection close is asynchronous; poll until both counters drain to 0
+ // before asserting (asserting synchronously is racy).
+ hbaseTestUtil.waitFor(30000, 100,
+ () -> GLOBAL_OPEN_PHOENIX_CONNECTIONS.getMetric().getValue() == 0L);
+ hbaseTestUtil.waitFor(30000, 100,
+ () -> GLOBAL_OPEN_INTERNAL_PHOENIX_CONNECTIONS.getMetric().getValue() == 0L);
long connections = GLOBAL_OPEN_PHOENIX_CONNECTIONS.getMetric().getValue();
assertEquals(String.format("Found %d connections still open.", connections), 0, connections);
connections = GLOBAL_OPEN_INTERNAL_PHOENIX_CONNECTIONS.getMetric().getValue();
@@ -159,7 +165,9 @@ public class MaxConcurrentConnectionsIT extends BaseTest {
} finally {
connection.close();
}
- // All 10 child connections should be removed successfully from the queue
+ // Child-connection reaping is asynchronous; wait until the queue
+ // drains before asserting.
+ hbaseTestUtil.waitFor(30000, 100, () -> connection.getChildConnectionsCount() == 0);
assertEquals(0, connection.getChildConnectionsCount());
}
}
(phoenix) 01/08: PHOENIX-7827 TableSnapshotReadsMapReduceIT per-test unique snapshot name (#2444)
Posted by vj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
virajjasani pushed a commit to branch 5.2
in repository https://gitbox.apache.org/repos/asf/phoenix.git
commit 6b171647782fc12478fd9b43987650973ac8aa1d
Author: Andrew Purtell <ap...@apache.org>
AuthorDate: Tue Jun 30 10:08:53 2026 -0700
PHOENIX-7827 TableSnapshotReadsMapReduceIT per-test unique snapshot name (#2444)
---
.../end2end/TableSnapshotReadsMapReduceIT.java | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/TableSnapshotReadsMapReduceIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/TableSnapshotReadsMapReduceIT.java
index a20e7f25db..0e56e25cb9 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/TableSnapshotReadsMapReduceIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/TableSnapshotReadsMapReduceIT.java
@@ -89,7 +89,6 @@ public class TableSnapshotReadsMapReduceIT extends BaseTest {
private static final String RECORDING_YEAR = "RECORDING_YEAR";
private static final String RECORDINGS_QUARTER = "RECORDINGS_QUARTER";
private static final String MAX_RECORDING = "MAX_RECORDING";
- private final static String SNAPSHOT_NAME = "FOO";
private static final String FIELD1 = "FIELD1";
private static final String FIELD2 = "FIELD2";
private static final String FIELD3 = "FIELD3";
@@ -106,6 +105,7 @@ public class TableSnapshotReadsMapReduceIT extends BaseTest {
private static List<List<Object>> result;
private long timestamp;
private String tableName;
+ private String snapshotName;
private Job job;
private Path tmpDir;
private Configuration conf;
@@ -133,6 +133,7 @@ public class TableSnapshotReadsMapReduceIT extends BaseTest {
// create table
try (Connection conn = DriverManager.getConnection(getUrl())) {
tableName = generateUniqueName();
+ snapshotName = "SNAP_" + tableName;
conn.createStatement().execute(String.format(CREATE_TABLE, tableName));
conn.commit();
}
@@ -144,7 +145,7 @@ public class TableSnapshotReadsMapReduceIT extends BaseTest {
@Test
public void testMapReduceSnapshots() throws Exception {
- PhoenixMapReduceUtil.setInput(job, PhoenixIndexDBWritable.class, SNAPSHOT_NAME, tableName,
+ PhoenixMapReduceUtil.setInput(job, PhoenixIndexDBWritable.class, snapshotName, tableName,
tmpDir, null, FIELD1, FIELD2, FIELD3);
configureJob(job, tableName, null, null, false);
}
@@ -152,14 +153,14 @@ public class TableSnapshotReadsMapReduceIT extends BaseTest {
@Test
public void testMapReduceSnapshotsMultiRegion() throws Exception {
String inputQuery = "SELECT * FROM " + tableName + " ORDER BY FIELD1 asc";
- PhoenixMapReduceUtil.setInput(job, PhoenixIndexDBWritable.class, SNAPSHOT_NAME, tableName,
+ PhoenixMapReduceUtil.setInput(job, PhoenixIndexDBWritable.class, snapshotName, tableName,
tmpDir, inputQuery);
configureJob(job, tableName, null, null, true);
}
@Test
public void testMapReduceSnapshotsWithCondition() throws Exception {
- PhoenixMapReduceUtil.setInput(job, PhoenixIndexDBWritable.class, SNAPSHOT_NAME, tableName,
+ PhoenixMapReduceUtil.setInput(job, PhoenixIndexDBWritable.class, snapshotName, tableName,
tmpDir, FIELD3 + " > 0001", FIELD1, FIELD2, FIELD3);
configureJob(job, tableName, null, "FIELD3 > 0001", false);
}
@@ -167,7 +168,7 @@ public class TableSnapshotReadsMapReduceIT extends BaseTest {
@Test
public void testMapReduceSnapshotWithLimit() throws Exception {
String inputQuery = "SELECT * FROM " + tableName + " ORDER BY FIELD2 LIMIT 1";
- PhoenixMapReduceUtil.setInput(job, PhoenixIndexDBWritable.class, SNAPSHOT_NAME, tableName,
+ PhoenixMapReduceUtil.setInput(job, PhoenixIndexDBWritable.class, snapshotName, tableName,
tmpDir, inputQuery);
configureJob(job, tableName, inputQuery, null, false);
}
@@ -175,13 +176,13 @@ public class TableSnapshotReadsMapReduceIT extends BaseTest {
@Test
public void testSnapshotMapReduceJobNotImpactingTableMapReduceJob() throws Exception {
// Submitting and asserting successful Map Reduce Job over snapshots
- PhoenixMapReduceUtil.setInput(job, PhoenixIndexDBWritable.class, SNAPSHOT_NAME, tableName,
+ PhoenixMapReduceUtil.setInput(job, PhoenixIndexDBWritable.class, snapshotName, tableName,
tmpDir, null, FIELD1, FIELD2, FIELD3);
configureJob(job, tableName, null, null, false);
// Asserting that snapshot name is set in configuration
Configuration config = job.getConfiguration();
- Assert.assertEquals("Correct snapshot name not found in configuration", SNAPSHOT_NAME,
+ Assert.assertEquals("Correct snapshot name not found in configuration", snapshotName,
config.get(PhoenixConfigurationUtil.SNAPSHOT_NAME_KEY));
TestingMapReduceParallelScanGrouper.clearNumCallsToGetRegionBoundaries();
@@ -311,7 +312,7 @@ public class TableSnapshotReadsMapReduceIT extends BaseTest {
rs.next());
assertRestoreDirCount(conf, tmpDir.toString(), 1);
} finally {
- deleteSnapshotIfExists(SNAPSHOT_NAME);
+ deleteSnapshotIfExists(snapshotName);
}
}
@@ -374,6 +375,7 @@ public class TableSnapshotReadsMapReduceIT extends BaseTest {
private void upsertAndSnapshot(String tableName, boolean shouldSplit, Configuration configuration)
throws Exception {
+ deleteSnapshotIfExists(snapshotName);
if (shouldSplit) {
// having very few rows in table doesn't really help much with splitting case.
// we should upsert large no of rows as a prerequisite to splitting
@@ -390,7 +392,7 @@ public class TableSnapshotReadsMapReduceIT extends BaseTest {
splitTableSync(admin, hbaseTableName, Bytes.toBytes("CCCC"), 2);
}
- snapshotCreateSync(hbaseTableName, admin, SNAPSHOT_NAME);
+ snapshotCreateSync(hbaseTableName, admin, snapshotName);
List<SnapshotDescription> snapshots = admin.listSnapshots();
Assert.assertEquals(tableName, snapshots.get(0).getTableNameAsString());
@@ -409,7 +411,7 @@ public class TableSnapshotReadsMapReduceIT extends BaseTest {
FileSystem fs = rootDir.getFileSystem(configuration);
Path restoreDir = new Path(configuration.get(PhoenixConfigurationUtil.RESTORE_DIR_KEY));
RestoreSnapshotHelper.copySnapshotForScanner(configuration, fs, rootDir, restoreDir,
- SNAPSHOT_NAME);
+ snapshotName);
PhoenixConfigurationUtil.setMRSnapshotManagedExternally(configuration, true);
}
}
(phoenix) 06/08: PHOENIX-7830 De-flake MutableIndexFailureIT (#2447)
Posted by vj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
virajjasani pushed a commit to branch 5.2
in repository https://gitbox.apache.org/repos/asf/phoenix.git
commit cc7e2a4a320df45a8f8a3b1eb28c64b1e64b8fe4
Author: Andrew Purtell <ap...@apache.org>
AuthorDate: Tue Jun 30 15:54:57 2026 -0700
PHOENIX-7830 De-flake MutableIndexFailureIT (#2447)
---
.../java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java
index ff397dda55..d1bbf25adf 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java
@@ -101,7 +101,6 @@ public class MutableIndexFailureIT extends BaseTest {
private static final Logger LOGGER = LoggerFactory.getLogger(MutableIndexFailureIT.class);
- public static volatile boolean FAIL_WRITE = false;
public static volatile String fullTableName;
private String tableName;
@@ -411,7 +410,7 @@ public class MutableIndexFailureIT extends BaseTest {
}
} finally {
- FAIL_WRITE = false;
+ FailingRegionObserver.FAIL_WRITE = false;
}
}
@@ -607,7 +606,7 @@ public class MutableIndexFailureIT extends BaseTest {
}
public static class FailingRegionObserver extends SimpleRegionObserver {
- public static boolean TOGGLE_FAIL_WRITE_FOR_RETRY = false;
+ public static volatile boolean TOGGLE_FAIL_WRITE_FOR_RETRY = false;
public static volatile boolean FAIL_WRITE = false;
public static volatile boolean FAIL_NEXT_WRITE = false;
public static final String FAIL_INDEX_NAME = "FAIL_IDX";
(phoenix) 04/08: PHOENIX-7825 ConcurrentMutationsIT make MyClock.shouldAdvance volatile (#2442)
Posted by vj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
virajjasani pushed a commit to branch 5.2
in repository https://gitbox.apache.org/repos/asf/phoenix.git
commit 038ae08dc5e14dc92e8a4868ba1fe166491bfad1
Author: Andrew Purtell <ap...@apache.org>
AuthorDate: Tue Jun 30 15:51:02 2026 -0700
PHOENIX-7825 ConcurrentMutationsIT make MyClock.shouldAdvance volatile (#2442)
---
.../src/it/java/org/apache/phoenix/end2end/ConcurrentMutationsIT.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConcurrentMutationsIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConcurrentMutationsIT.java
index a20a266871..fcaacb4ca2 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConcurrentMutationsIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConcurrentMutationsIT.java
@@ -44,7 +44,7 @@ public class ConcurrentMutationsIT extends ParallelStatsDisabledIT {
private static class MyClock extends EnvironmentEdge {
public volatile long time;
- boolean shouldAdvance = true;
+ volatile boolean shouldAdvance = true;
public MyClock(long time) {
this.time = time;
(phoenix) 08/08: PHOENIX-7952 UpsertSelectIT is flaky due to a connection leak check using a global counter (#2561)
Posted by vj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
virajjasani pushed a commit to branch 5.2
in repository https://gitbox.apache.org/repos/asf/phoenix.git
commit 88498b1e2440e2f4844990a97e7eb3177dbb62b5
Author: Andrew Purtell <ap...@apache.org>
AuthorDate: Tue Jun 30 15:57:39 2026 -0700
PHOENIX-7952 UpsertSelectIT is flaky due to a connection leak check using a global counter (#2561)
Co-authored-by: Claude Opus 4.8[1m] <no...@anthropic.com>
---
.../org/apache/phoenix/end2end/UpsertSelectIT.java | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertSelectIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertSelectIT.java
index 0c71efc10f..fc5cc38397 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertSelectIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertSelectIT.java
@@ -105,12 +105,27 @@ public class UpsertSelectIT extends ParallelStatsDisabledIT {
@After
public void assertNoConnLeak() throws Exception {
- boolean refCountLeaked = isAnyStoreRefCountLeaked();
+ // The server-side UPSERT SELECT path can open auxiliary connections that are closed
+ // asynchronously on background threads, so a simple synchronous read can race ahead of
+ // their decrement. Poll for the counter to settle down before declaring a leak.
+ waitForOpenConnectionsToSettle();
assertTrue(PhoenixRuntime.areGlobalClientMetricsBeingCollected());
- assertEquals(0, GLOBAL_OPEN_PHOENIX_CONNECTIONS.getMetric().getValue());
+ boolean refCountLeaked = isAnyStoreRefCountLeaked();
assertFalse("refCount leaked", refCountLeaked);
}
+ private static void waitForOpenConnectionsToSettle() throws InterruptedException {
+ final long timeoutMs = 30000;
+ final long pollIntervalMs = 100;
+ long deadline = EnvironmentEdgeManager.currentTimeMillis() + timeoutMs;
+ long openConnections = GLOBAL_OPEN_PHOENIX_CONNECTIONS.getMetric().getValue();
+ while (openConnections != 0 && EnvironmentEdgeManager.currentTimeMillis() < deadline) {
+ Thread.sleep(pollIntervalMs);
+ openConnections = GLOBAL_OPEN_PHOENIX_CONNECTIONS.getMetric().getValue();
+ }
+ assertEquals(0, openConnections);
+ }
+
// name is used by failsafe as file name in reports
@Parameters(name = "UpsertSelecttIT_allowServerSideMutations={0}")
public static synchronized Object[] data() {
(phoenix) 05/08: PHOENIX-7826 MetadataGetTableReadLockIT wait for coprocessor swap to land (#2443)
Posted by vj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
virajjasani pushed a commit to branch 5.2
in repository https://gitbox.apache.org/repos/asf/phoenix.git
commit 8480406e3026158ee949b3ff49577038502777ad
Author: Andrew Purtell <ap...@apache.org>
AuthorDate: Tue Jun 30 15:51:39 2026 -0700
PHOENIX-7826 MetadataGetTableReadLockIT wait for coprocessor swap to land (#2443)
---
.../phoenix/end2end/MetadataGetTableReadLockIT.java | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MetadataGetTableReadLockIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MetadataGetTableReadLockIT.java
index 392e74ddbe..f2344fc8c9 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MetadataGetTableReadLockIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MetadataGetTableReadLockIT.java
@@ -23,6 +23,8 @@ import java.sql.DriverManager;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.regionserver.HRegion;
import org.apache.hadoop.hbase.regionserver.Region;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.phoenix.coprocessor.MetaDataEndpointImpl;
@@ -72,6 +74,7 @@ public class MetadataGetTableReadLockIT extends BaseTest {
BlockingMetaDataEndpointImpl.setSleepSignal(sleepSignal);
BlockingMetaDataEndpointImpl.setSleepDuration(SLEEP_DURATION);
TestUtil.addCoprocessor(conn, "SYSTEM.CATALOG", BlockingMetaDataEndpointImpl.class);
+ waitForCoprocessorOnSystemCatalog(BlockingMetaDataEndpointImpl.class);
// start thread-1 and wait for signal before it starts sleeping
Thread t1 = getQueryThread(tableName);
@@ -94,6 +97,23 @@ public class MetadataGetTableReadLockIT extends BaseTest {
}
}
+ private static void waitForCoprocessorOnSystemCatalog(Class<?> coprocessorClass) throws Exception {
+ final TableName sysCatalog = TableName.valueOf("SYSTEM.CATALOG");
+ utility.waitFor(10000, 100, () -> {
+ List<HRegion> regions = utility.getHBaseCluster().getRegions(sysCatalog);
+ if (regions.isEmpty()) {
+ return false;
+ }
+ for (HRegion region : regions) {
+ if (region.getCoprocessorHost()
+ .findCoprocessor(coprocessorClass.getName()) == null) {
+ return false;
+ }
+ }
+ return true;
+ });
+ }
+
private static Thread getQueryThread(String tableName) {
Runnable runnable = () -> {
try (Connection conn1 = DriverManager.getConnection(getUrl())) {
(phoenix) 02/08: PHOENIX-7947 GlobalConnectionTenantTableIT NPE when auto-unboxing (#2558)
Posted by vj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
virajjasani pushed a commit to branch 5.2
in repository https://gitbox.apache.org/repos/asf/phoenix.git
commit f0c6449ab91ff4c099bbfdf63b3388f153e99b80
Author: Andrew Purtell <ap...@apache.org>
AuthorDate: Tue Jun 30 10:51:42 2026 -0700
PHOENIX-7947 GlobalConnectionTenantTableIT NPE when auto-unboxing (#2558)
Co-authored-by: Claude Opus 4.8[1m] <no...@anthropic.com>
---
.../src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java b/phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
index 9bd595ba71..a69f88f356 100644
--- a/phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
+++ b/phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
@@ -630,7 +630,13 @@ public class PhoenixConnection
throw new TableNotFoundException(fullTableName);
}
} catch (TableNotFoundException e) {
- table = getTableNoCache(pTenantId, fullTableName, timestamp);
+ // timestamp is @Nullable Long; avoid a Long -> long auto-unboxing NPE when the caller
+ // asked for the latest table (null timestamp) and the cache missed.
+ if (timestamp == null) {
+ table = getTableNoCache(pTenantId, fullTableName);
+ } else {
+ table = getTableNoCache(pTenantId, fullTableName, timestamp);
+ }
}
return table;
}