This is an automated email from the ASF dual-hosted git repository.
palashc pushed a commit to branch 5.2
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/5.2 by this push:
new 9f902e1424 PHOENIX-7385 : Fix MetadataGetTableReadLockIT flapper
(#1954) (#1956)
9f902e1424 is described below
commit 9f902e1424d289c3413a89fc8df7ada256466b91
Author: Palash Chauhan <[email protected]>
AuthorDate: Fri Aug 16 17:19:56 2024 -0700
PHOENIX-7385 : Fix MetadataGetTableReadLockIT flapper (#1954) (#1956)
Co-authored-by: Palash Chauhan
<[email protected]>
---
.../org/apache/phoenix/end2end/MetadataGetTableReadLockIT.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
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 7fd98801e2..589748c491 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
@@ -41,7 +41,7 @@ import java.util.concurrent.CountDownLatch;
/**
* Class which tests whether non-exclusive locking on metadata read path
(getTable) works as expected.
*/
-@Category(ParallelStatsDisabledTest.class)
+@Category(NeedsOwnMiniClusterTest.class)
public class MetadataGetTableReadLockIT extends BaseTest {
@BeforeClass
@@ -123,16 +123,17 @@ public class MetadataGetTableReadLockIT extends BaseTest {
@Override
protected Region.RowLock acquireLock(Region region, byte[] lockKey,
List<Region.RowLock> locks, boolean readLock) throws IOException {
+ long tmpSleepDuration = sleepDuration;
Region.RowLock rowLock = region.getRowLock(lockKey,
this.getMetadataReadLockEnabled && readLock);
if (rowLock == null) {
throw new IOException("Failed to acquire lock on " +
Bytes.toStringBinary(lockKey));
}
- sleepSignal.countDown();
if (locks != null) {
locks.add(rowLock);
}
+ sleepSignal.countDown();
try {
- Thread.sleep(sleepDuration);
+ Thread.sleep(tmpSleepDuration);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}