C0urante edited a comment on pull request #9826:
URL: https://github.com/apache/kafka/pull/9826#issuecomment-790751172


   Thanks for taking this on, Tom!
   
   This seems fairly involved and I'm wondering if there's a simpler solution. 
The changes here cause `DistributedHerder::start` to block on the completion of 
`DistributedHerder::startServices`, which is invoked on a separate thread. If 
we want to retain this blocking behavior, could we move the invocation of 
`DistributedHerder::startServices` into the `DistributedHerder::start` method? 
I'm thinking something like this:
   
   ```java
   public class DistributedHerder extends AbstractHerder {
     @Override
     public void start() {
       log.info("Herder starting");
       startServices();
       log.info("Herder started");
   
       this.herderExecutor.submit(this);
     }
   }
   ```
   
   Also, I haven't looked at standalone mode yet, but I'm hoping that any 
solution we arrive at can work for both it and distributed mode in order to 
avoid gotchas due to unexpected differences in behavior between the two.


----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to