Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

feat: cancel queued and active SQLite reads

Đang mở
#400 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, react-native, sqlite
Lĩnh vực
databases, mobile

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C
Star
580
Fork
53
Merge trung bình
1 ngày 19 giờ
Pull request đã merge (30 ngày)
68

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của margelo/react-native-nitro-sqlite

Tất cả issue của margelo/react-native-nitro-sqlite

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.