Skip to content

Commit

Permalink
fix validation logic for manager indexer
Browse files Browse the repository at this point in the history
Signed-off-by: aknishid <[email protected]>
  • Loading branch information
aknishid committed Jan 8, 2025
1 parent 6065fd9 commit 116bd00
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 {

Check warning on line 79 in pkg/manager/index/service/indexer.go

View check run for this annotation

Codecov / codecov/patch

pkg/manager/index/service/indexer.go#L79

Added line #L79 was not covered by tests
return nil, errors.ErrInvalidConfig
}
return i, nil
Expand Down

0 comments on commit 116bd00

Please sign in to comment.