wenbingshen commented on PR #4481: URL: https://github.com/apache/bookkeeper/pull/4481#issuecomment-2293034895
> can we consider to prevent outside call of `bkc.getClientCtx().getScheduler().schedule`, BTW, is this widely used in pulsar project? @shoothzj 1. Simply blocking external calls to `bkc.getClientCtx().getScheduler().schedule` can reduce the risk of the problem, but it cannot fundamentally solve the problem because the scheduler is still shared in internal components. 2. ClientContext and scheduler were introduced from bookkeeper-4.9.0 and are not widely used in Pulsar, but it is uncertain whether they are relied on in other people's projects. Blocking calls will introduce compatibility issues. 3. If you want to optimize the sharing of scheduler by internal components to avoid blocking WatchTask, the code modification is more complicated than the current PR. 4. Providing an independent thread pool for WatchTask is the simplest way, and the thread pool is only allowed for internal use, and it is indicated in the name and comments that external use is prohibited. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
