storagenode/gracefulexit: retry workers faster
Change-Id: Ica20a691ff117a2b36a6362ee1fed21ce49a9ac1
This commit is contained in:
parent
e6bea41083
commit
f0ef01de5b
@ -99,14 +99,20 @@ func (chore *Chore) Run(ctx context.Context) (err error) {
|
||||
}
|
||||
})
|
||||
}
|
||||
chore.limiter.Wait()
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
chore.limiter.Wait()
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// TestWaitForWorkers waits for any pending worker to finish.
|
||||
func (chore *Chore) TestWaitForWorkers() {
|
||||
chore.limiter.Wait()
|
||||
}
|
||||
|
||||
// Close closes chore.
|
||||
func (chore *Chore) Close() error {
|
||||
chore.Loop.Close()
|
||||
|
@ -106,6 +106,8 @@ func exitSatellite(ctx context.Context, t *testing.T, planet *testplanet.Planet,
|
||||
|
||||
// run the SN chore again to start processing transfers.
|
||||
exitingNode.GracefulExit.Chore.Loop.TriggerWait()
|
||||
// wait for workers to finish
|
||||
exitingNode.GracefulExit.Chore.TestWaitForWorkers()
|
||||
|
||||
// check that there are no more items to process
|
||||
queueItems, err = satellite1.DB.GracefulExit().GetIncomplete(ctx, exitStatus.NodeID, 10, 0)
|
||||
|
@ -21,7 +21,7 @@ var (
|
||||
|
||||
// Config for graceful exit.
|
||||
type Config struct {
|
||||
ChoreInterval time.Duration `help:"how often to run the chore to check for satellites for the node to exit." releaseDefault:"15m" devDefault:"10s"`
|
||||
ChoreInterval time.Duration `help:"how often to run the chore to check for satellites for the node to exit." releaseDefault:"1m" devDefault:"10s"`
|
||||
NumWorkers int `help:"number of workers to handle satellite exits" default:"4"`
|
||||
NumConcurrentTransfers int `help:"number of concurrent transfers per graceful exit worker" default:"5"`
|
||||
MinBytesPerSecond memory.Size `help:"the minimum acceptable bytes that an exiting node can transfer per second to the new node" default:"5KB"`
|
||||
|
Loading…
Reference in New Issue
Block a user