From 116bd00fc2ed974f09d5a937f82d2fe428ee5b3a Mon Sep 17 00:00:00 2001 From: aknishid Date: Wed, 8 Jan 2025 14:14:57 +0900 Subject: [PATCH] fix validation logic for manager indexer Signed-off-by: aknishid --- pkg/manager/index/service/indexer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/manager/index/service/indexer.go b/pkg/manager/index/service/indexer.go index e0eb87c4e6..6f9caa4eba 100644 --- a/pkg/manager/index/service/indexer.go +++ b/pkg/manager/index/service/indexer.go @@ -76,7 +76,7 @@ func New(opts ...Option) (idx Indexer, err error) { } i.indexing.Store(false) i.saving.Store(false) - if i.indexDuration+i.indexDurationLimit+i.saveIndexDurationLimit <= 0 { + if i.indexDuration < 0 && i.indexDurationLimit < 0 && i.saveIndexDurationLimit < 0 { return nil, errors.ErrInvalidConfig } return i, nil