Skip to content

[PR] fix(ci): close store1 before dropping index.db in #3769 pooled-bare-load — Windows EBUSY - #4087

Merged
ranxianglei merged 1 commit into
masterfrom
2026-10-21_3769-win-ebusy
Oct 21, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-10-21_3769-win-ebusy

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

(ai: zhipuai-lb/glm-5.3)

#4077 的补完(它已合并,这是 post-merge supplement)。Fixes 的 #4076 家族残留:master windows 分片仍红。

现象

master(56a0f5a 起)与 #4084 的 test (windows-latest, 22, 1) 红:

not ok - bare-id loadSync hydrates a pooled envelope when the unified index misses (#3769 flake)
error: "EBUSY: resource busy or locked, unlink '...\bili-pool-store-...\index.db'"
  at TestContext.<anonymous> (tests/issue3769-pooled-bare-load.test.ts:109)

根因

该测试模拟「index 丢失」时 rmSync(index.db/-wal/-shm),但 store1 的 sqlite 句柄还开着——Windows 拒绝 unlink 打开中的文件(EBUSY),Linux 无此限制所以本地/CI ubuntu 全绿。#4077 只修了 ubuntu 侧(存储模式钉 full)和 plugin-fork 侧(先 closeQuietly 再删),漏了这个文件的同类 rmSync——它就是 #4076 红的 windows 半边,一直没被发现是因为 ubuntu 半边先修掉后 windows 分片才单独暴露。

改动(1 文件 3 行)

删库前先 store1.closeQuietly()(与 plugin-fork 冷恢复同款纪律;finally 里的统一 closeQuietly 容忍二次关闭)。

验证

合并后 #4084(verif 修复)rerun 即应全绿。

…oad — Windows EBUSY

The cold-restore simulation rmSync's index.db while store1's sqlite handle
is still open; Windows refuses the unlink with EBUSY, failing the test on
every windows shard (the half of the #4076 red that the #4077 pin could not
fix). Close store1 first, same discipline as the plugin-fork cold restores;
the finally block's closeQuietly() pass tolerates the double close.
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-21_3769-win-ebusy (9a49780)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.4868-pr.4087.24f74e8

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr4087.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title fix(ci): close store1 before dropping index.db in #3769 pooled-bare-load — Windows EBUSY [PR] fix(ci): close store1 before dropping index.db in #3769 pooled-bare-load — Windows EBUSY Oct 21, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: zhipuai-lb/glm-5.3)
CI 解读(免得误判):

@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.701-master.9a97169 (rolling master tag).

npm install -g billion-context@0.0.701-master.9a97169  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

This was referenced Oct 21, 2026
Zhishulo pushed a commit to Zhishulo/billion-context that referenced this pull request Oct 21, 2026
@github-actions github-actions Bot mentioned this pull request Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant