You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "lhotari (via GitHub)" <gi...@apache.org> on 2024/04/26 07:00:02 UTC

[PR] [improve][broker] Don't use forkjoin pool by default for deleting partitioned topics [pulsar]

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

   ### Motivation
   
   While investigating some recent test failures and Pulsar CI OOME issues, #22588, the heap dumps revealed that
   the ForkJoin pool's work queue is retaining a lot of CompletableFuture related instances. 
   
   <img width="983" alt="image" src="https://github.com/apache/pulsar/assets/66864/92a686d7-268c-4e66-a470-e1ffbdf53491">
   
   The heap dump confirms that these are originating from `NamespaceResources.PartitionedTopicResources#runWithMarkDeleteAsync` method in this location:
   https://github.com/apache/pulsar/blob/bbdc173e80157296ff0475cfdc4e36f5d063a7df/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/resources/NamespaceResources.java#L345-L374
   
   The assumption is that graceful shutdown in tests without causing memory leaks will be more achievable with the provided executor since the instance isn't shared like the Fork join common pool executor.
   
   ### Modifications
   
   Instead of using the forkjoin pool by default in `NamespaceResources.PartitionedTopicResources#runWithMarkDeleteAsync`, use a specific executor. For Pulsar broker, this would be the executor returned by `PulsarService#getExecutor()`
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   


-- 
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


Re: [PR] [improve][broker] Don't use forkjoin pool by default for deleting partitioned topics [pulsar]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari merged PR #22598:
URL: https://github.com/apache/pulsar/pull/22598


-- 
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