{satellite,storagnode}/gracefulexit: reduce logging

Change-Id: I9f274ede77a582fc43ef14a47bf9341d4e3083df
This commit is contained in:
Egon Elbre 2020-01-19 22:36:13 +02:00
parent ee0293c212
commit d5438036b5
2 changed files with 2 additions and 5 deletions

View File

@ -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 {

View File

@ -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