Fix `Init` of db indexer (#25470)

Fix regression of #25174.

The `Init` of the db indexer should return true to indicate that the
index was opened/existed, or the indexer will try to populate the index
(not really populate, just fill the queue, `Index` method of the db
indexer is a dummy).
pull/25460/head^2
Jason Song 2 years ago committed by GitHub
parent e441a5d751
commit 3c7f5ed7b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      modules/indexer/internal/db/indexer.go

@ -16,8 +16,9 @@ type Indexer struct{}
// Init initializes the indexer
func (i *Indexer) Init(_ context.Context) (bool, error) {
// nothing to do
return false, nil
// Return true to indicate that the index was opened/existed.
// So that the indexer will not try to populate the index, the data is already there.
return true, nil
}
// Ping checks if the indexer is available

Loading…
Cancel
Save