From 78bb1b843bf256e8a84d0c6c6e4076ccf9141342 Mon Sep 17 00:00:00 2001 From: Vicente Cheng Date: Wed, 6 Dec 2023 16:13:52 +0800 Subject: [PATCH] controller: reduce the jitter from 7~13 to 1~3 - we do not need the long jitter Signed-off-by: Vicente Cheng --- pkg/controller/blockdevice/controller.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/controller/blockdevice/controller.go b/pkg/controller/blockdevice/controller.go index 7cd00343..bebd8791 100644 --- a/pkg/controller/blockdevice/controller.go +++ b/pkg/controller/blockdevice/controller.go @@ -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 1 to 3. func jitterEnqueueDelay() time.Duration { - enqueueDelay := 10 - randNum, err := gocommon.GenRandNumber(3) + enqueueDelay := 2 + randNum, err := gocommon.GenRandNumber(1) if err != nil { logrus.Errorf("Failed to generate random number, set randnumber to `0`: %v", err) }