Repository navigation
don't bother with transactions for client DB - #8861
Conversation
Some users are still hitting 'database is locked' errors despite SQLite being tuned properly as far as I can tell. We really don't need transactions for this, so just remove them. Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
|
@vito is it the |
|
@sipsma I think It's a bit surprising this happened considering we already tune all the "magic knobs" I know of and even have one-db-per-client, but I'm pretty certain we don't actually need transactions for this, so it seems worth trying and might help perf a bit. Merged this a bit aggressively so that I can hand the CI-pushed image ref to the affected user and see if it fixes things for them. Will keep an eye out for any sketchiness. |
This reverts commit 925cf02. This didn't end up helping the one user it affected, and it feels better for each request to be all-or-nothing considering OTel will retry requests. Signed-off-by: Alex Suraci <[email protected]>
* engine: set synchronous=OFF for client DBs All of this data is ephemeral - we don't care if we lose it on a system crash. Setting synchronous=NORMAL opens up to slowdowns from random I/O blocks, as observed when running `test all`. Without this change we could occasionally see a span insert blocking for more than 10 seconds, triggering a timeout when shutting down the OTel proxy server. The odds of this happening in `test all` were pretty high - at least one in two runs. After this change I have been able to run `test all` 8 times and none of them hit that particular issue. (Three failed, but that's neither here nor there.) Signed-off-by: Alex Suraci <[email protected]> * Revert "don't bother with transactions for client DB (#8861)" This reverts commit 925cf02. This didn't end up helping the one user it affected, and it feels better for each request to be all-or-nothing considering OTel will retry requests. Signed-off-by: Alex Suraci <[email protected]> --------- Signed-off-by: Alex Suraci <[email protected]>
* engine: set synchronous=OFF for client DBs All of this data is ephemeral - we don't care if we lose it on a system crash. Setting synchronous=NORMAL opens up to slowdowns from random I/O blocks, as observed when running `test all`. Without this change we could occasionally see a span insert blocking for more than 10 seconds, triggering a timeout when shutting down the OTel proxy server. The odds of this happening in `test all` were pretty high - at least one in two runs. After this change I have been able to run `test all` 8 times and none of them hit that particular issue. (Three failed, but that's neither here nor there.) Signed-off-by: Alex Suraci <[email protected]> * Revert "don't bother with transactions for client DB (dagger#8861)" This reverts commit 925cf02. This didn't end up helping the one user it affected, and it feels better for each request to be all-or-nothing considering OTel will retry requests. Signed-off-by: Alex Suraci <[email protected]> --------- Signed-off-by: Alex Suraci <[email protected]>
Some users are still hitting 'database is locked' errors despite SQLite being tuned properly as far as I can tell. We really don't need transactions for this, so just remove them.