From d42dd37cacd18239b20c235f3bca9cccf657d856 Mon Sep 17 00:00:00 2001 From: Andrew Purtell Date: Tue, 24 Nov 2026 11:52:19 -0800 Subject: [PATCH] PHOENIX-7838 LogicalTableNameBaseIT sets a short master lock timeout for snapshots HBase 2.5 LockProcedure can lose the wakeup that releases a table lock. The snapshot handler releases its exclusive lock inside this window. The lock then stays held until the local master lock timeout of 10 minutes. The client snapshot call times out, and its retries fail with "already running another snapshot". Set the local master lock timeout to 30 seconds in the test cluster. A lost wakeup then costs at most 30 seconds, which is less than the client RPC timeout, so the first snapshot call completes. Co-Authored-By: Claude Opus 5.5 --- .../org/apache/phoenix/end2end/LogicalTableNameBaseIT.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/LogicalTableNameBaseIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/LogicalTableNameBaseIT.java index 9e2048362b2..ea9dd3e5d34 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/LogicalTableNameBaseIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/LogicalTableNameBaseIT.java @@ -73,6 +73,9 @@ static void initCluster(boolean isNamespaceMapped) throws Exception { props.put(QueryServices.DROP_METADATA_ATTRIB, Boolean.TRUE.toString()); props.put(BaseScannerRegionObserverConstants.PHOENIX_MAX_LOOKBACK_AGE_CONF_KEY, Integer.toString(60 * 60 * 1000)); // An hour + // In HBase 2.5, a master race can lose the wakeup that releases a snapshot table lock. + // A short lock timeout releases the lock before the client snapshot call times out. + props.put("hbase.master.procedure.local.master.locks.timeout.ms", Integer.toString(30000)); if (isNamespaceMapped) { props.put(QueryServices.IS_NAMESPACE_MAPPING_ENABLED, Boolean.TRUE.toString()); }