sqlite: do not `Ping()` after connecting

`Ping()` requires the DB lock, so we had to move it into a transaction
to fix #17859. Since we try to access the DB directly afterwards, I
prefer to let that fail instead of paying the cost of a transaction
which would lock the DB for _all_ processes.

[NO NEW TESTS NEEDED] as it's a hard to reproduce race.

Fixes: #17859
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg 2023-03-28 11:27:43 +02:00
parent 2cfb6e1c0e
commit cdb5b3e990
1 changed files with 0 additions and 4 deletions

View File

@ -80,10 +80,6 @@ func NewSqliteState(runtime *Runtime) (_ State, defErr error) {
state.conn = conn
if err := state.conn.Ping(); err != nil {
return nil, fmt.Errorf("cannot connect to database: %w", err)
}
// Migrate schema (if necessary)
if err := state.migrateSchemaIfNecessary(); err != nil {
return nil, err