Skip to content

sqlite: run backup completion in callback scope - #65666

Open
panva wants to merge 1 commit into
nodejs:mainfrom
panva:fix-sqlite-backup-microtasks
Open

sqlite: run backup completion in callback scope#65666
panva wants to merge 1 commit into
nodejs:mainfrom
panva:fix-sqlite-backup-microtasks

Conversation

@panva

@panva panva commented Aug 30, 2026

Copy link
Copy Markdown
Member

Run SQLite backup after-work callbacks inside an internal callback scope. This drains promise reactions and next ticks before the event loop can become idle.

Add a child-process regression test where backup is the final active request.

This fixes intermittent test-sqlite-backup timeouts observed in nodejs/reliability and recent node-test-pull-request Jenkins jobs.

@panva panva added the flaky-test Issues and PRs involving tests that fail intermittently in CI. label Aug 30, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/sqlite

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. sqlite Issues and PRs related to the SQLite subsystem. labels Aug 30, 2026
Run SQLite backup after-work callbacks inside an internal callback
scope. This drains promise reactions and next ticks before the event
loop can become idle.

Add a child-process regression test where backup is the final active
request.

Assisted-by: Codex
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
@panva
panva force-pushed the fix-sqlite-backup-microtasks branch from 9b71eea to 43d8fdf Compare August 30, 2026 12:32
@codecov

codecov Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.05%. Comparing base (045ff95) to head (43d8fdf).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65666      +/-   ##
==========================================
- Coverage   91.79%   90.05%   -1.75%     
==========================================
  Files         402      754     +352     
  Lines      181164   255746   +74582     
  Branches    27776    48325   +20549     
==========================================
+ Hits       166308   230317   +64009     
- Misses      14517    16541    +2024     
- Partials      339     8888    +8549     
Files with missing lines Coverage Δ
src/node_sqlite.cc 82.14% <100.00%> (ø)

... and 484 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@trivikr

trivikr commented Aug 30, 2026

Copy link
Copy Markdown
Member

Stress tests are skipped on rhel8-ppc64le
https://ci.nodejs.org/job/node-stress-single-test/859/console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. flaky-test Issues and PRs involving tests that fail intermittently in CI. needs-ci PRs that need a full CI run. sqlite Issues and PRs related to the SQLite subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants