forked from TrueCloudLab/frostfs-node
Revert "[#963] node: Go on initialization even deposit notary is hung"
This reverts commit b4cb54e7ed
.
Signed-off-by: aarifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
f42a529f49
commit
7a4b6057ce
4 changed files with 2 additions and 24 deletions
|
@ -67,10 +67,7 @@ func main() {
|
|||
|
||||
bootUp(ctx, c)
|
||||
|
||||
go func() {
|
||||
c.initAppWG.Wait()
|
||||
c.compareAndSwapHealthStatus(control.HealthStatus_STARTING, control.HealthStatus_READY)
|
||||
}()
|
||||
c.compareAndSwapHealthStatus(control.HealthStatus_STARTING, control.HealthStatus_READY)
|
||||
|
||||
wait(c)
|
||||
}
|
||||
|
@ -147,16 +144,7 @@ func stopAndLog(c *cfg, name string, stopper func() error) {
|
|||
func bootUp(ctx context.Context, c *cfg) {
|
||||
runAndLog(ctx, c, "NATS", true, connectNats)
|
||||
runAndLog(ctx, c, "gRPC", false, func(_ context.Context, c *cfg) { serveGRPC(c) })
|
||||
|
||||
// It may happen that boot-up waits for the execution of a notary deposit transaction
|
||||
// and waiting loop may hang for an indefinite time. In this case, we need to let
|
||||
// frostfs-node go on initialization, although its functionality will be available partially.
|
||||
// That's why makeAndWaitNotaryDeposit is run asynchroniosly.
|
||||
c.initAppWG.Add(1)
|
||||
c.workers = append(c.workers, newWorkerFromFunc(func(ctx context.Context) {
|
||||
defer c.initAppWG.Done()
|
||||
runAndLog(ctx, c, "notary", true, makeAndWaitNotaryDeposit)
|
||||
}))
|
||||
runAndLog(ctx, c, "notary", true, makeAndWaitNotaryDeposit)
|
||||
|
||||
bootstrapNode(c)
|
||||
startWorkers(ctx, c)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue