Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

ISSUE-2439: Create BookieNettyServer after newBookie #251

Open
sijie opened this issue Oct 14, 2020 · 0 comments
Open

ISSUE-2439: Create BookieNettyServer after newBookie #251

sijie opened this issue Oct 14, 2020 · 0 comments

Comments

@sijie
Copy link
Member

sijie commented Oct 14, 2020

Original Issue: apache#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);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant