Skip to content

Commit

Permalink
Fix validation logic for manager indexer (#2797)
Browse files Browse the repository at this point in the history
* fix validation logic for manager indexer

Signed-off-by: aknishid <[email protected]>

* Change validation to include zero.

Signed-off-by: aknishid <[email protected]>

---------

Signed-off-by: aknishid <[email protected]>
Co-authored-by: Kiichiro YUKAWA <[email protected]>
  • Loading branch information
aknishid and vankichi authored Jan 27, 2025
1 parent a8a60aa commit 8b3087f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/manager/index/service/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8b3087f

Please sign in to comment.