You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2020/10/14 15:11:29 UTC

[GitHub] [bookkeeper] Technoboy- opened a new issue #2439: Create BookieNettyServer after newBookie

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