Skip to content

feat: force close db - #9335

Merged
sid-bruno merged 1 commit into
usebruno:mainfrom
sid-bruno:fix/sqlite-db-closers-4.2.0-main
Sep 24, 2026
Merged

sid-bruno merged 1 commit into
usebruno:mainfrom
sid-bruno:fix/sqlite-db-closers-4.2.0-main

Conversation

@sid-bruno

@sid-bruno sid-bruno commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Mergeback #9334

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.
  • I've run the claude code review skill locally.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

Summary by CodeRabbit

  • Bug Fixes
    • Mount services are now forcefully stopped when the app exits instead of waiting for a graceful shutdown. This helps the app finish closing when mount-related background work is still running. The change applies to shutdown behavior; mount handling while the app is running remains unchanged.

Copilot AI lite review requested due to automatic review settings September 23, 2026 07:35
@sid-bruno sid-bruno changed the title feat: force close db (#9334) feat: force close db Sep 23, 2026
@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: usebruno/bruno/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 45e8f311-b0ba-4a56-ba2f-99f1baf26ec3

📥 Commits

Reviewing files that changed from the base of the PR and between eb61402 and d1673de.

📒 Files selected for processing (4)
  • packages/bruno-electron/src/index.js
  • packages/bruno-electron/src/ipc/mount.js
  • packages/bruno-electron/src/services/mount/manager.js
  • packages/bruno-electron/src/services/pool/index.js

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


Walkthrough

The app quit handler now requests forced mount shutdown. The force option passes through the mount IPC helper and manager to workerpool termination.

Changes

Mount shutdown

Layer / File(s) Summary
Force option propagation
packages/bruno-electron/src/index.js, packages/bruno-electron/src/ipc/mount.js, packages/bruno-electron/src/services/mount/manager.js, packages/bruno-electron/src/services/pool/index.js
The quit handler passes { force: true }. The IPC helper, mount manager, and pool forward the option to workerpool.terminate(force). The default remains false when no option is provided.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Feature

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title describes the main change: forcefully shutting down the database mount and worker pool when the app exits.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

The quit signal starts its flight
Through mount and pool, options in sight
A force flag travels on its way
The worker pool shuts down today
The app can finish its goodbye

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

In-flight mount operations must be prevented from mutating the database after forced shutdown.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 1 Low severity

Open (2)
What changed in this PR

Adds forced worker-pool termination during Electron shutdown to prevent parser jobs from delaying database cleanup.

Changes:

  • Propagates force through pool and mount shutdown APIs.
  • Enables forced cleanup during application quit.
  • Forwards shutdown options through IPC.
File Summary Review findings
packages/​bruno-electron/​src/​services/​pool/​index.js Supports forced worker-pool termination. —
packages/​bruno-electron/​src/​services/​mount/​manager.js Propagates forced shutdown during mount cleanup. Critical (3 votes): In-flight mounts may continue after force-closing and reopen or mutate the mount DB. Nit (3 votes): Add regression coverage for forced and default shutdown behavior.
packages/​bruno-electron/​src/​ipc/​mount.js Forwards shutdown options through IPC. —
packages/​bruno-electron/​src/​index.js Requests forced cleanup during application quit. —

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@sid-bruno
sid-bruno merged commit e66ea68 into usebruno:main Sep 24, 2026
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants