diff --git a/core/collection/rollingwindow.go b/core/collection/rollingwindow.go index 04ecf89e..2795195d 100644 --- a/core/collection/rollingwindow.go +++ b/core/collection/rollingwindow.go @@ -87,7 +87,7 @@ func (rw *RollingWindow) updateOffset() { offset := rw.offset // reset expired buckets for i := 0; i < span; i++ { - rw.win.resetBucket(offset + i + 1) + rw.win.resetBucket((offset + i + 1) % rw.size) } rw.offset = (offset + span) % rw.size