You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/05/11 09:18:49 UTC

[GitHub] [pulsar] nicoloboschi opened a new pull request, #15541: [improve][test] Reduce LedgerUnderreplicationManagerTest flakyness

nicoloboschi opened a new pull request, #15541:
URL: https://github.com/apache/pulsar/pull/15541

   ### Motivation
   
   In our CI environment we've seen many times that the test `LedgerUnderreplicationManagerTest` fails in this way:
   ```
   java.util.concurrent.TimeoutException
   	at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1886)
   	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2021)
   	at org.apache.pulsar.metadata.bookkeeper.LedgerUnderreplicationManagerTest.test2reportSame(LedgerUnderreplicationManagerTest.java:428)
   ```
   
   All of the tests then fail. The reason behind the timeout is that the method `LedgerUnderreplicationManagerTest#getLedgerToReplicate` uses the common thread pool and it causes deadlock in some way. Using a dedicated thread pool solves the issue.
   
   Note that I haven't ever seen this failure in the OSS pulsar CI so I believe is related to the way we run the tests in our CI but the fix is still a good solution
   
   ### Modifications
   * Use a dedicated thread pool for the method `getLedgerToReplicate`. This is a test method so the production code is not affected at all.
     
   - [x] `no-need-doc` 


-- 
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-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] nicoloboschi commented on pull request #15541: [improve][test] Reduce LedgerUnderreplicationManagerTest flakyness

Posted by GitBox <gi...@apache.org>.
nicoloboschi commented on PR #15541:
URL: https://github.com/apache/pulsar/pull/15541#issuecomment-1123889453

   /pulsarbot rerun-failure-checks


-- 
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-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] Technoboy- merged pull request #15541: [improve][test] Reduce LedgerUnderreplicationManagerTest flakyness

Posted by GitBox <gi...@apache.org>.
Technoboy- merged PR #15541:
URL: https://github.com/apache/pulsar/pull/15541


-- 
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-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] eolivelli commented on a diff in pull request #15541: [improve][test] Reduce LedgerUnderreplicationManagerTest flakyness

Posted by GitBox <gi...@apache.org>.
eolivelli commented on code in PR #15541:
URL: https://github.com/apache/pulsar/pull/15541#discussion_r870258302


##########
pulsar-metadata/src/test/java/org/apache/pulsar/metadata/bookkeeper/LedgerUnderreplicationManagerTest.java:
##########
@@ -84,8 +86,10 @@ private Future<Long> getLedgerToReplicate(LedgerUnderreplicationManager m) {
 
     private String basePath;
     private String urLedgerPath;
+    private Executor executor;
 
     private void methodSetup(Supplier<String> urlSupplier) throws Exception {
+        this.executor = Executors.newSingleThreadExecutor();

Review Comment:
   it looks like we are not shutting down this executor



-- 
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-unsubscribe@pulsar.apache.org

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