{satellite,storagnode}/gracefulexit: reduce logging
Change-Id: I9f274ede77a582fc43ef14a47bf9341d4e3083df
This commit is contained in:
parent
ee0293c212
commit
d5438036b5
@ -46,7 +46,6 @@ func (chore *Chore) Run(ctx context.Context) (err error) {
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
return chore.Loop.Run(ctx, func(ctx context.Context) (err error) {
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
chore.log.Debug("checking pending exits")
|
||||
|
||||
exitingNodes, err := chore.overlay.GetExitingNodes(ctx)
|
||||
if err != nil {
|
||||
@ -55,10 +54,10 @@ func (chore *Chore) Run(ctx context.Context) (err error) {
|
||||
}
|
||||
|
||||
nodeCount := len(exitingNodes)
|
||||
chore.log.Debug("graceful exit", zap.Int("exitingNodes", nodeCount))
|
||||
if nodeCount == 0 {
|
||||
return nil
|
||||
}
|
||||
chore.log.Debug("found exiting nodes", zap.Int("exitingNodes", nodeCount))
|
||||
|
||||
exitingNodesLoopIncomplete := make(storj.NodeIDList, 0, nodeCount)
|
||||
for _, node := range exitingNodes {
|
||||
|
@ -54,8 +54,6 @@ func (chore *Chore) Run(ctx context.Context) (err error) {
|
||||
err = chore.Loop.Run(ctx, func(ctx context.Context) (err error) {
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
|
||||
chore.log.Debug("checking pending exits")
|
||||
|
||||
satellites, err := chore.satelliteDB.ListGracefulExits(ctx)
|
||||
if err != nil {
|
||||
chore.log.Error("error retrieving satellites.", zap.Error(err))
|
||||
@ -63,9 +61,9 @@ func (chore *Chore) Run(ctx context.Context) (err error) {
|
||||
}
|
||||
|
||||
if len(satellites) == 0 {
|
||||
chore.log.Debug("no satellites found")
|
||||
return nil
|
||||
}
|
||||
chore.log.Debug("exiting", zap.Int("satellites", len(satellites)))
|
||||
|
||||
for _, satellite := range satellites {
|
||||
mon.Meter("satellite_gracefulexit_request").Mark(1) //locked
|
||||
|
Loading…
Reference in New Issue
Block a user