From 39b7bd1e8b75d42d04228f9fb2a1bdf6804ce19c Mon Sep 17 00:00:00 2001 From: Maurice van Veen Date: Fri, 27 Dec 2024 12:10:07 +0100 Subject: [PATCH] De-flake TestJetStreamClusterMirrorAndSourceExpiration Signed-off-by: Maurice van Veen --- server/filestore.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/filestore.go b/server/filestore.go index 7544c0ea54..8c5907621d 100644 --- a/server/filestore.go +++ b/server/filestore.go @@ -5317,7 +5317,7 @@ func (fs *fileStore) expireMsgs() { defer fs.mu.Unlock() // TODO: Not great that we're holding the lock here, but the timed hash wheel isn't thread-safe. - var nextTTL int64 + nextTTL := int64(math.MaxInt64) if fs.ttls != nil { fs.ttls.ExpireTasks(func(seq uint64, ts int64) { fs.removeMsgViaLimits(seq) @@ -5331,7 +5331,7 @@ func (fs *fileStore) expireMsgs() { } } - // Onky cancel if no message left, not on potential lookup error that would result in sm == nil. + // Only cancel if no message left, not on potential lookup error that would result in sm == nil. if fs.state.Msgs == 0 && nextTTL == math.MaxInt64 { fs.cancelAgeChk() } else {