Skip to content

feat(database): Enable Write-Ahead Logging for Room DB#4499

Merged
jamesarich merged 1 commit into
mainfrom
feat/write-ahead
Feb 7, 2026
Merged

feat(database): Enable Write-Ahead Logging for Room DB#4499
jamesarich merged 1 commit into
mainfrom
feat/write-ahead

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

Enables Write-Ahead Logging (WAL) for the Room database instances. This can improve performance by allowing reads and writes to occur concurrently.

Enables Write-Ahead Logging (WAL) for the Room database instances. This can improve performance by allowing reads and writes to occur concurrently.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 7, 2026 19:09
@github-actions github-actions Bot added the enhancement New feature or request label Feb 7, 2026

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.

Pull request overview

This PR explicitly enables Write-Ahead Logging (WAL) for the app’s Room database builders to improve concurrency between reads and writes.

Changes:

  • Set Room JournalMode to WRITE_AHEAD_LOGGING in the primary MeshtasticDatabase builder.
  • Set Room JournalMode to WRITE_AHEAD_LOGGING in the per-device DB builder used by DatabaseManager.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
core/database/src/main/kotlin/org/meshtastic/core/database/MeshtasticDatabase.kt Forces WAL mode on the singleton/legacy Room database builder.
core/database/src/main/kotlin/org/meshtastic/core/database/DatabaseManager.kt Forces WAL mode on dynamically created per-device Room databases managed via LRU caching.

@jamesarich jamesarich enabled auto-merge February 7, 2026 19:19
@codecov

codecov Bot commented Feb 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 11.09%. Comparing base (7c37b30) to head (e1e16e7).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...in/org/meshtastic/core/database/DatabaseManager.kt 0.00% 1 Missing ⚠️
...org/meshtastic/core/database/MeshtasticDatabase.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4499      +/-   ##
==========================================
- Coverage   11.09%   11.09%   -0.01%     
==========================================
  Files         429      429              
  Lines       14447    14449       +2     
  Branches     2391     2391              
==========================================
  Hits         1603     1603              
- Misses      12540    12545       +5     
+ Partials      304      301       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamesarich jamesarich added this pull request to the merge queue Feb 7, 2026
Merged via the queue into main with commit e94e4da Feb 7, 2026
15 checks passed
@jamesarich jamesarich deleted the feat/write-ahead branch February 7, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants