chevaris opened a new issue, #1253:
URL: https://github.com/apache/curator/issues/1253

   Took recently 5.8.0 release in my project that depends on Curator and some 
tests were running really slow compared with previous versions (5.7.1, 5.7.0)
   
   I took a closer look and CuratorFramework.close is invoked ZK server is stop 
(
   
   I have included a test that makes reproduction easy and shows that with 
Curator 5.8.0 close() method takes 20 times longer to complete.
   - Curator 5.7.1 closing Curator instance takes 1200 millis
   - Curator 5.8.0 closing Curator instance takes 20000 millis
   
   
   package com.cheva.grantor;
   
   import static java.util.concurrent.TimeUnit.SECONDS;
   import static org.junit.jupiter.api.Assertions.assertTrue;
   
   import java.time.Duration;
   import java.time.Instant;
   
   import org.apache.curator.framework.CuratorFramework;
   import org.apache.curator.framework.CuratorFrameworkFactory;
   import org.apache.curator.retry.RetryOneTime;
   import org.apache.curator.test.BaseClassForTests;
   import org.junit.jupiter.api.Test;
   
   class CuratorCloseSlow extends BaseClassForTests {
   
     @Test
     void tesCuratorCloseSlow() throws Exception {
       Instant t0;
       try (CuratorFramework cf =
           CuratorFrameworkFactory.newClient(server.getConnectString(), new 
RetryOneTime(1_000))) {
         cf.start();
         assertTrue(cf.blockUntilConnected(2, SECONDS));
         cf.create().forPath("/jejeje");
         server.stop();
         Thread.sleep(100L);
         t0 = Instant.now();
       }
       Instant t1 = Instant.now();
       long closeDurationMillis = Duration.between(t0, t1).toMillis();
       System.out.println("Close Duration took " + closeDurationMillis + " 
millis");
       assertTrue(closeDurationMillis < 2_000L);
     }
   }
   
   
   
   I am running Linux with OpenJDK
   openjdk version "17.0.14" 2025-01-21
   OpenJDK Runtime Environment (build 17.0.14+7)
   OpenJDK 64-Bit Server VM (build 17.0.14+7, mixed mode, sharing)
   
   Linux cheva-virtualmachine 6.6.75-2-MANJARO #1 SMP PREEMPT_DYNAMIC Mon Feb  
3 17:53:46 UTC 2025 x86_64 GNU/Linux
   
   Thanks,
   
   Cheva
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@curator.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to