diff --git a/core/stat/base/leap_array.go b/core/stat/base/leap_array.go index d8f62be1..cc581a66 100644 --- a/core/stat/base/leap_array.go +++ b/core/stat/base/leap_array.go @@ -70,8 +70,7 @@ func NewAtomicBucketWrapArrayWithTime(len int, bucketLengthInMs uint32, now uint data: make([]*BucketWrap, len), } - timeId := now / uint64(bucketLengthInMs) - idx := int(timeId) % len + idx := int((now / uint64(bucketLengthInMs)) % uint64(len)) startTime := calculateStartTime(now, bucketLengthInMs) for i := idx; i <= len-1; i++ {