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 a483aa8b50 PHOENIX-7385 : Fix MetadataGetTableReadLockIT flapper 
(#1954)
a483aa8b50 is described below

commit a483aa8b508ef2e5b3c6510e90506358accb5a25
Author: Palash Chauhan <palashc...@gmail.com>
AuthorDate: Fri Aug 16 10:16:56 2024 -0700

    PHOENIX-7385 : Fix MetadataGetTableReadLockIT flapper (#1954)
    
    Co-authored-by: Palash Chauhan 
<p.chau...@pchauha-ltm8owy.internal.salesforce.com>
---
 .../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();
             }

Reply via email to