sql-js / sql-js/sql.js

StatementIterator leaks if not run to completion

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

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

bug
Ngôn ngữ chính
JavaScript
Star
13.7k
Fork
1.1k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

A statement provided by StatementIterator can be leaked until the Database is closed if the iterator is not run to completion. A statement is not freed until next is called for the following iteration, which might not happen if, for example, a for...of loop is exited via break, return, or thrown exception.

Careful coding can work around this issue, but that code will also be uglier and harder to read. A better fix would be to implement the optional return method on the iterator to reclaim its resources, as that will be automatically called on early loop termination.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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.

Hướng nghiên cứu

Start in src/api.js at the StatementIterator next implementation referenced by the issue, then review the ECMAScript optional iterator return method. Confirm how early for...of termination behaves when using break, return, or an exception. Done means the statement is reclaimed on early termination instead of remaining allocated until the Database closes.

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

Đánh giá

Công nghệ
javascript, sqlite
Lĩnh vực
database
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
48/100

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.