reflector.go/db
Alex Grintsvayg 2a1557845d
wrap blob insertion in tx. fixes lbryio/lbry-sdk#3296
The problem is that inserting an sd blob with ~5k
blobs takes longer than 30 seconds. So the client
times out and retries the request. At that point,
reflector is not done inserting so it replies with
a smaller number of blobs than it should. The client
uploads that many blobs and marks the stream as
reflected. The remaining blobs never get uploaded.

Doing the insert inside a transaction should be
faster than doing 10k (2 per blob) inserts
independently.
2021-05-24 10:40:31 -04:00
..
db.go wrap blob insertion in tx. fixes lbryio/lbry-sdk#3296 2021-05-24 10:40:31 -04:00
interfaces.go wrap blob insertion in tx. fixes lbryio/lbry-sdk#3296 2021-05-24 10:40:31 -04:00