Skip to content

test(storage): relax bundle export lock timeout - #2385

Merged
Astro-Han merged 1 commit into
apache:mainfrom
Astro-Han:fix/storage-artifact-writer-lock-cleanup-race
Aug 7, 2026
Merged

test(storage): relax bundle export lock timeout#2385
Astro-Han merged 1 commit into
apache:mainfrom
Astro-Han:fix/storage-artifact-writer-lock-cleanup-race

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

  • give bundle-export lock scenarios a dedicated 10-second watchdog
  • keep the 5-second watchdog for ordinary Artifact writer-lock operations
  • prevent a completed-but-slower SQLite backup from racing temporary-directory cleanup and surfacing a secondary ENOTEMPTY

Root cause

On Node 26.5.1, node:sqlite online backup takes about 5.0 seconds after the test waits on a child-held Artifact writer lock. The test used the same 5-second operation timeout, so the timeout rejected while bundle export and the queued projection were still completing. Temporary-directory cleanup then raced those operations and often replaced the original timeout with ENOTEMPTY.

The same scenario completed in about 0.3 seconds on the repository's Node 24 CI runtime. Production code completed successfully on every observed Node 26 run, so this keeps the change at the test watchdog seam rather than changing lock, SQLite, or cleanup behavior.

Verification

  • before: Node 26.5.1 focused target, 50/50 failed (mostly ENOTEMPTY, some direct projection timeouts), about 5.4 seconds per run
  • after: Node 26.5.1 focused target, 20/20 passed, about 5.44–5.50 seconds per run
  • after: Node 24.18.1 focused target, 20/20 passed
  • after: Node 26.5.1 artifact-writer-lock.test, 10/10 passed with --test-concurrency=1
  • after: Node 24.18.1 artifact-writer-lock.test, 10/10 passed with --test-concurrency=1
  • after: Node 24.18.1 npm --workspace @maka/storage test, 748 tests, 736 passed, 12 skipped, 0 failed
  • npx biome check packages/storage/src/__tests__/artifact-writer-lock.test.ts

@Astro-Han
Astro-Han marked this pull request as ready for review August 7, 2026 04:47
@Astro-Han
Astro-Han merged commit 5835a22 into apache:mainAug 7, 2026
12 checks passed
@Astro-Han
Astro-Han deleted the fix/storage-artifact-writer-lock-cleanup-race branch August 7, 2026 05:22
Sign up for freeto 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

@Astro-Han