-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BeaconChainController.start() future should complete when all services started #8981
Conversation
@@ -347,12 +347,17 @@ | |||
LOG.debug("Starting {}", this.getClass().getSimpleName()); | |||
forkChoiceExecutor.start(); | |||
return initialize() | |||
.thenCompose(__ -> timerService.start()) |
Check notice
Code scanning / CodeQL
Useless parameter Note
@@ -347,12 +347,17 @@ | |||
LOG.debug("Starting {}", this.getClass().getSimpleName()); | |||
forkChoiceExecutor.start(); | |||
return initialize() | |||
.thenCompose(__ -> timerService.start()) | |||
.thenCompose(__ -> recentChainData.getStoreInitializedFuture()) |
Check notice
Code scanning / CodeQL
Useless parameter Note
(err) -> LOG.debug("rejected execution poll failed", err))); | ||
public SafeFuture<Void> start() { | ||
return SafeFuture.of(metricsEndpoint.start()) | ||
.thenCompose(__ -> metricsPublisher.start()) |
Check notice
Code scanning / CodeQL
Useless parameter Note
public SafeFuture<Void> start() { | ||
return SafeFuture.of(metricsEndpoint.start()) | ||
.thenCompose(__ -> metricsPublisher.start()) | ||
.thenCompose(__ -> getServiceController().start()) |
Check notice
Code scanning / CodeQL
Useless parameter Note
Oh, it looks like that doesn't work with pre-genesis start. Services are expected to start after genesis only. |
PR Description
PR addresses the issue described in comment: #8980 (comment)
BeaconChainController.start()
returnedFuture
should complete when all 'sub-services' are up and runningSystem.exit()
to the upper level from theBeaconChainController
to have more control on startup errors (for example in unit tests)Documentation
doc-change-required
label to this PR if updates are required.Changelog