Skip to content

Commit

Permalink
controller: reduce the jitter from 7~13 to 5~7
Browse files Browse the repository at this point in the history
    - we do not need the long jitter

Signed-off-by: Vicente Cheng <[email protected]>
  • Loading branch information
Vicente-Cheng committed Dec 13, 2023
1 parent 66b83ab commit 6f9e796
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/controller/blockdevice/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -680,10 +680,10 @@ func needUpdateMountPoint(bd *diskv1.BlockDevice, filesystem *block.FileSystemIn
return NeedMountUpdateNoOp
}

// jitterEnqueueDelay returns a random duration between 7 to 13.
// jitterEnqueueDelay returns a random duration between 3 to 7.
func jitterEnqueueDelay() time.Duration {
enqueueDelay := 10
randNum, err := gocommon.GenRandNumber(3)
enqueueDelay := 5
randNum, err := gocommon.GenRandNumber(2)
if err != nil {
logrus.Errorf("Failed to generate random number, set randnumber to `0`: %v", err)
}
Expand Down

0 comments on commit 6f9e796

Please sign in to comment.