jerrypeng commented on a change in pull request #7237:
URL: https://github.com/apache/pulsar/pull/7237#discussion_r439266943
##########
File path:
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/SchedulerManager.java
##########
@@ -137,25 +165,35 @@ public SchedulerManager(WorkerConfig workerConfig,
PulsarClient pulsarClient, Pu
}
public Future<?> schedule() {
- return executorService.submit(() -> {
- synchronized (SchedulerManager.this) {
- boolean isLeader = membershipManager.isLeader();
- if (isLeader) {
- try {
- invokeScheduler();
- } catch (Exception e) {
- log.warn("Failed to invoke scheduler", e);
- throw e;
+ try {
Review comment:
What are you thinking? What is the complexity here?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]