Skip to content

⚡ Bolt: Enable SQLite Memory-Mapped I/O for Local Metadata Store#188

Open
thebearwithabite wants to merge 1 commit intomasterfrom
bolt-fix-sqlite-mmap-size-5005377279755165471
Open

⚡ Bolt: Enable SQLite Memory-Mapped I/O for Local Metadata Store#188
thebearwithabite wants to merge 1 commit intomasterfrom
bolt-fix-sqlite-mmap-size-5005377279755165471

Conversation

@thebearwithabite
Copy link
Copy Markdown
Owner

💡 What: Replaced the invalid string 'XXXXXXXXX' with the integer 268435456 in local_metadata_store.py for PRAGMA mmap_size. Added a journal entry logging the learning.

🎯 Why: Invalid PRAGMA values in SQLite fail silently. Because of the string placeholder, the database wasn't actually enabling memory-mapped I/O as intended by the developer (comment # 256MB). Enabling mmap_size optimizes I/O and speeds up database reads, which is crucial for a local metadata store.

📊 Impact: Properly enables memory-mapped I/O for up to 256MB of database file size, drastically reducing memory copy overhead during read operations.

🔬 Measurement: Code was verified manually using a temporary script to test PRAGMA mmap_size behavior, confirming that a string sets it to 0 and an integer sets it to the intended value.


PR created automatically by Jules for task 5005377279755165471 started by @thebearwithabite

Fixed a bug where `PRAGMA mmap_size` was incorrectly assigned a string (`'XXXXXXXXX'`) instead of an integer. Because SQLite silently ignores invalid PRAGMA values, memory-mapped I/O was completely disabled. This patch sets the value to `268435456` (256MB) to correctly enable memory-mapped I/O and significantly improve database read performance.

Also logged learning in `.jules/bolt.md`.

Co-authored-by: thebearwithabite <216692431+thebearwithabite@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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