tursodatabase / tursodatabase/libsql-client-ts

Interleaved transactions no longer work

Open
#104 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
576
Forks
69
PR merge metrics
No merged PRs in 30d

Description

Pull request #100 optimized the API to share the same connection, but this now breaks interleaved transactions:

  const tx1 = await libsql.transaction('deferred')
  await tx1.execute(`SELECT 1`)

  const tx2 = await libsql.transaction('deferred')
  await tx2.execute(`SELECT 1`)

  await tx1.commit()
  await tx2.commit()

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading pull request #100 and tracing the transaction API used by the reproduction. Run the interleaved transaction example with two deferred transactions; done means both transactions can execute and commit successfully without breaking the shared-connection behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
sqlite, typescript
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.