Skip to content

Commit

Permalink
fix server start race
Browse files Browse the repository at this point in the history
  • Loading branch information
max-hoffman committed Oct 24, 2024
1 parent 2d50424 commit 0a0b605
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions go/cmd/dolt/commands/engine/sqlengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ func NewSqlEngine(

all := dbs[:]

// this is overwritten only for server sessions
for _, db := range dbs {
db.DbData().Ddb.SetCommitHookLogger(ctx, cli.CliOut)
}

clusterDB := config.ClusterController.ClusterDatabase()
if clusterDB != nil {
all = append(all, clusterDB.(dsess.SqlDatabase))
Expand Down Expand Up @@ -207,11 +212,6 @@ func NewSqlEngine(
}
}

// this is overwritten only for server sessions
for _, db := range dbs {
db.DbData().Ddb.SetCommitHookLogger(ctx, cli.CliOut)
}

err = sql.SystemVariables.SetGlobal(dsess.DoltCommitOnTransactionCommit, config.DoltTransactionCommit)
if err != nil {
return nil, err
Expand Down

0 comments on commit 0a0b605

Please sign in to comment.