-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
Since version 0.15 rowsAffected has been 0 even when new rows get inserted.
This seems to only affect turso databases hosted on aws. Legacy databases hosted on fly.io are fine, as are local file databases.
Have confirmed that we are not hitting the todo marked line in the client as returnsData is false.
app-1 | returnsData false
app-1 | info { changes: 0, duration: 0.873753976, lastInsertRowid: 54 }
Have confirmed that the rows actually do get written.
For context, we use rowsAffected to implement optimistic concurrency control:
const result = await dbClient.execute({
sql: insertEventRow,
args: constructArgsForNewEventRow(event, resource, newResourceVersion),
});
return result.rowsAffected === 1
? 'raised-event'
: 'last-known-version-out-of-date';
We only switched to 0.15 as 0.14 produced the following error for aws hosted Turso databases.
ERROR tower_http::trace::on_failure: response failed classification=Error: status: Internal, message: "Invalid header bit 123 expected 0 or 1", details: [], metadata: MetadataMap { headers: {} } latency=70 ms
Metadata
Metadata
Assignees
Labels
No labels