Skip to content

Commit

Permalink
Fix db-allow-schema-drift handling (#6431)
Browse files Browse the repository at this point in the history
-------

## Motivation

`db-allow-schema-drift` stopped working after adding separate conn pool for the API
  • Loading branch information
ivan4th committed Nov 4, 2024
1 parent 4c18ec4 commit 77cc51b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ See [RELEASE](./RELEASE.md) for workflow instructions.

### Improvements

* [#6431](https://github.com/spacemeshos/go-spacemesh/pull/6431) Fix db-allow-schema-drift handling
* [#6408](https://github.com/spacemeshos/go-spacemesh/pull/6408) Prevent empty DB connection pool by freeing connections
upon errors during DB operations. This mostly fixes issues when a node is under heavy load from the API.

Expand Down
1 change: 1 addition & 0 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -1998,6 +1998,7 @@ func (app *App) setupDBs(ctx context.Context, lg log.Log) error {
sql.WithReadOnly(),
sql.WithLogger(apiDBLog),
sql.WithConnections(app.Config.API.DatabaseConnections),
sql.WithNoCheckSchemaDrift(), // already checked above
sql.WithMigrationsDisabled(),
)
if err != nil {
Expand Down

0 comments on commit 77cc51b

Please sign in to comment.