[BUG]: Unclosed IndexedDB connections cause resource leaks during multi-org exploration

Đang mở
#359 1 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

@ydvvdinesh đang làm issue này rồi.

Từ ngày 15/10/2026.

  • #360 của @ydvvdinesh — đã đóng, không merge

Đánh giá

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

Hướng nghiên cứu

Start in src/services/github.js, where openDB() is called by cacheGet, cacheSet and cacheClear, each opening its own connection with indexedDB.open(DB_NAME, 1). Check the open pull request #360 first, since it is already working on this. Done means every transaction path closes its connection on completion, error and abort, and that repeated cache operations no longer leave handles open.

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

Mô tả

bug
Bug Description

In src/services/github.js, cache functions (cacheGet, cacheSet, cacheClear) call openDB(), which opens a new connection via indexedDB.open(DB_NAME, 1). However, db.close() is never called when transactions complete, error, or abort.

When exploring organizations with many repositories, contributors, issues, and pull requests, dozens to hundreds of open IDBDatabase connections accumulate and remain open in the browser process. This leads to connection pool exhaustion, browser memory retention, and blocks database deletions or schema version upgrades (onblocked).

Steps to Reproduce
  1. Open OrgExplorer and explore a multi-repo organization (e.g. AOSSIE-Org or facebook).
  2. Open Browser DevTools -> Application -> Storage -> IndexedDB.
  3. Inspect active connection handles or trigger multiple cache clearing operations in Settings.
  4. Observe that dozens of IDBDatabase connections remain open without being closed upon transaction completion.
Logs and Screenshots

No error thrown initially, but memory profiles show accumulating IDBDatabase handles, and version change requests or cache clears can trigger onblocked due to lingering open connections.

Environment Details
  • OS: Windows 11 / Linux / macOS
  • Browser: Chrome / Firefox / Safari / Edge
  • Node.js: 20.x / 22.x
Impact

High - Major feature is broken

Code of Conduct
  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates
Ngôn ngữ chính
JavaScript
Star
53
Fork
187
Merge trung bình
18 phút
Pull request đã merge (30 ngày)
2

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 AOSSIE-Org/OrgExplorer

Tất cả issue của AOSSIE-Org/OrgExplorer

Issue tương tự

Thêm issue về JavaScript

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.