Technoboy- opened a new issue #2439:
URL: https://github.com/apache/bookkeeper/issues/2439
When constructs BookieServer, newBookie maybe throw exception and then to
shutdown nettyServer.
```
this.nettyServer = new BookieNettyServer(this.conf, null, allocator);
try {
this.bookie = newBookie(conf, allocator, bookieServiceInfoProvider);
} catch (IOException | KeeperException | InterruptedException |
BookieException e) {
// interrupted on constructing a bookie
this.nettyServer.shutdown();
throw e;
}
```
Should we create BookieNettyServer after newBookie like below :
```
try {
this.bookie = newBookie(conf, allocator, bookieServiceInfoProvider);
} catch (IOException | KeeperException | InterruptedException |
BookieException e) {
throw e;
}
final SecurityHandlerFactory shFactory = SecurityProviderFactoryFactory
.getSecurityProviderFactory(conf.getTLSProviderFactoryClass());
this.requestProcessor = new BookieRequestProcessor(conf, bookie,
statsLogger.scope(SERVER_SCOPE), shFactory, bookie.getAllocator());
this.nettyServer = new BookieNettyServer(this.conf, this.requestProcessor,
allocator);
```
----------------------------------------------------------------
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]