textileio / broker-core

Broker for the Filecoin network
MIT License
4 stars 1 forks source link

Error updating database #234

Open merlinran opened 3 years ago

merlinran commented 3 years ago

Saw this from make up locally.

brokerd_1      | 2021-08-10T22:00:18.162Z   DEBUG   broker  broker/broker.go:412    auction 01fcs18b087mprak1pjct3491v closed batch 01fcs189fvc5tjqbmpqawfyt2g  with 1 winning bids, errorCause
postgres_1     | 2021-08-10 22:00:18.197 UTC [60] ERROR:  could not serialize access due to read/write dependencies among transactions
postgres_1     | 2021-08-10 22:00:18.197 UTC [60] DETAIL:  Reason code: Canceled on identification as a pivot, during write.
postgres_1     | 2021-08-10 22:00:18.197 UTC [60] HINT:  The transaction might succeed if retried.
postgres_1     | 2021-08-10 22:00:18.197 UTC [60] STATEMENT:  -- name: UpdateStorageRequestsStatus :exec
postgres_1     |    UPDATE storage_requests
postgres_1     |    SET status = $2,
postgres_1     |        updated_at = CURRENT_TIMESTAMP
postgres_1     |    WHERE batch_id = $1
postgres_1     |
brokerd_1      | 2021-08-10T22:00:18.199Z   ERROR   gpubsub gpubsub/gpubsub.go:152  calling auction-closed handler: processing closed auction: adding storage-provider deals: saving storage request: ERROR: could not serialize access due to read/write dependencies among transactions (SQLSTATE 40001)
brokerd_1      | 2021-08-10T22:00:18.283Z   DEBUG   broker  broker/broker.go:412    auction 01fcs18b087mprak1pjct3491v closed batch 01fcs189fvc5tjqbmpqawfyt2g  with 1 winning bids, errorCause
brokerd_1      | 2021-08-10T22:00:18.288Z   DEBUG   broker  broker/broker.go:495    publishing ready to create deals for auction 01fcs18b087mprak1pjct3491v, batch%!(EXTRA broker.BatchID=01fcs189fvc5tjqbmpqawfyt2g)
jsign commented 3 years ago

Feels to me that something expected that can happen reg serializable isolation on concurrent queries.