tursodatabase / tursodatabase/libsql

Total changes is accumulated per Hrana stream, not connection which is wrong

Open
#1,512 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue help wanted remote protocol
Dominant language
C
Stars
17.2k
Forks
531
Avg merge
1h 12m
Merged PRs (30d)
1

Description

We currently implement total_changes() incorrectly for Hrana client-side protocol because we accumulate the changes per stream, but should do it per connection. I merged the incorrect solution as an intermediate step to expose the API to users because fixing this is a bit involved. Hrana does pass connection to stream but turns it into something useless because of the generics trickery there.

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 at the Hrana client-side implementation of total_changes() and trace how the connection is passed into each stream, including the generics involved. Done means changes are accumulated per connection rather than per stream, with the behavior verified through the relevant existing checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, rust, sqlite
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.