Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

feat: cancel queued and active SQLite reads

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript, react-native, sqlite
Domain
databases, mobile

Research direction

Start by tracing the current JavaScript queue and native per-connection FIFO, then read SQLite's sqlite3_interrupt() documentation for cross-thread and transaction behavior. Add coverage for cancellation before admission, while queued in both layers, during a long-running query, and after completion. Done means cancelled reads reject recognizably, only their connection is interrupted, later queries still run, and connection closure remains safe.

Written by the indexing model from the issue text.

Description

area:api area:runtime enhancement

Async reads can queue behind an older query even after their caller no longer needs the result. A screen that changes query parameters quickly may therefore wait for several obsolete reads. The current JavaScript queue and native per-connection FIFO have no operation-specific cancellation path.

Add cancellation for asynchronous read queries and prepared-statement reads. A request cancelled before it starts should leave both queues without running SQL. An active request should interrupt only its own connection and reject with a recognizable cancellation error. Handle the race where a query finishes while cancellation is requested, and make sure a late cancellation cannot interrupt the next job. Keep connection closure safe while an interrupt is in flight.

Start with read-only operations. SQLite can roll back an entire explicit transaction when an interrupted write fails, so cancellation of writes, batches, and callback transactions needs a separate contract. Test cancellation before admission, while queued in JavaScript, while queued natively, during a long-running query, and just after completion. Verify that later queries on the same connection still run.

Related: #62. SQLite documents the cross-thread and transaction behavior of sqlite3_interrupt() at https://www.sqlite.org/c3ref/interrupt.html.

Dominant language
C
Stars
567
Forks
53
Avg merge
2d 5h
Merged PRs (30d)
67

Getting set up

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.

More from margelo/react-native-nitro-sqlite

All issues in margelo/react-native-nitro-sqlite

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.