From bf67ee9a42d7b9bb6326c7efacec8feec8d3cd2f Mon Sep 17 00:00:00 2001 From: Chris Schinnerl Date: Fri, 28 Jun 2024 15:37:13 +0200 Subject: [PATCH] stores: remove timeout when creating sql store --- stores/sql.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/stores/sql.go b/stores/sql.go index 8cc86be62..bc6cb47f1 100644 --- a/stores/sql.go +++ b/stores/sql.go @@ -186,9 +186,7 @@ func NewSQLStore(cfg Config) (*SQLStore, modules.ConsensusChangeID, error) { return nil, modules.ConsensusChangeID{}, fmt.Errorf("failed to create main database: %v", mainErr) } - ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) - defer cancel() - dbName, dbVersion, err := dbMain.Version(ctx) + dbName, dbVersion, err := dbMain.Version(context.Background()) if err != nil { return nil, modules.ConsensusChangeID{}, fmt.Errorf("failed to fetch db version: %v", err) } @@ -204,7 +202,7 @@ func NewSQLStore(cfg Config) (*SQLStore, modules.ConsensusChangeID, error) { } // Get latest consensus change ID or init db. - ci, ccid, err := initConsensusInfo(ctx, dbMain) + ci, ccid, err := initConsensusInfo(context.Background(), dbMain) if err != nil { return nil, modules.ConsensusChangeID{}, err }