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

未关闭
#359 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@ydvvdinesh 已经在做这个了。

开始于 2026年10月15日。

  • #360 来自 @ydvvdinesh —— 已关闭,未合并

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
22/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
javascript
领域
database

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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
主要语言
JavaScript
星标
53
派生
187
平均合并
18 分钟
30 天内合并 PR
2

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

AOSSIE-Org/OrgExplorer 的其他 Issue

查看 AOSSIE-Org/OrgExplorer 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。