From 3c7f5ed7b5bff347198cbb26492e6354ea42733b Mon Sep 17 00:00:00 2001 From: Jason Song Date: Fri, 23 Jun 2023 22:39:52 +0800 Subject: [PATCH] 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). --- modules/indexer/internal/db/indexer.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/indexer/internal/db/indexer.go b/modules/indexer/internal/db/indexer.go index 3f7e00efb..3deec836c 100644 --- a/modules/indexer/internal/db/indexer.go +++ b/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