diff --git a/internal/util/rocksmq/server/rocksmq/rocksmq_retention.go b/internal/util/rocksmq/server/rocksmq/rocksmq_retention.go index 3eb1d15aad..fbd9404db5 100644 --- a/internal/util/rocksmq/server/rocksmq/rocksmq_retention.go +++ b/internal/util/rocksmq/server/rocksmq/rocksmq_retention.go @@ -33,15 +33,15 @@ var RocksmqRetentionTimeInMinutes int64 // RocksmqRetentionSizeInMB is the size of retention var RocksmqRetentionSizeInMB int64 -// TickerTimeInSeconds is the time of expired check -var TickerTimeInSeconds int64 = 6 - // Const value that used to convert unit const ( MB = 2 << 20 MINUTE = 60 ) +// TickerTimeInSeconds is the time of expired check, default 10 minutes +var TickerTimeInSeconds int64 = 10 * MINUTE + type topicPageInfo struct { pageEndID []UniqueID pageMsgSize map[UniqueID]int64 diff --git a/internal/util/rocksmq/server/rocksmq/rocksmq_retention_test.go b/internal/util/rocksmq/server/rocksmq/rocksmq_retention_test.go index 343db3be3d..d3cc9154cd 100644 --- a/internal/util/rocksmq/server/rocksmq/rocksmq_retention_test.go +++ b/internal/util/rocksmq/server/rocksmq/rocksmq_retention_test.go @@ -34,6 +34,7 @@ func TestMain(m *testing.M) { log.Error("MkdirALl error for path", zap.Any("path", retentionPath)) return } + atomic.StoreInt64(&TickerTimeInSeconds, 6) code := m.Run() os.Exit(code) }