Skip to content

feat(search): Block WAL file access in PrivmxExtFS to reduce server requests#443

Open
kisielewski wants to merge 1 commit into
feat/search-apifrom
feat/search-block-wal-access
Open

feat(search): Block WAL file access in PrivmxExtFS to reduce server requests#443
kisielewski wants to merge 1 commit into
feat/search-apifrom
feat/search-block-wal-access

Conversation

@kisielewski

Copy link
Copy Markdown
Member

Summary

  • Added blockWalAccess flag to PrivmxExtFS (constructor parameter, defaults to false)
  • PrivmxExtFS::access() now short-circuits with false for paths ending in -wal when the flag is set
  • Search VFS registers PrivmxExtFS with blockWalAccess = true

Motivation

SQLite queries the VFS for WAL file existence on every read/write operation. Since the Search module does not use WAL mode, these calls were generating unnecessary round-trips to the server. This change intercepts them at the PrivmxExtFS level, keeping the VFS layer clean.

The -shm file is not a concern here — SQLite only checks for it after confirming the -wal file exists, so blocking -wal access prevents any -shm lookups as well.

The flag is intentionally placed in PrivmxExtFS rather than the VFS layer to allow a future SQL module to register its own VFS with WAL support enabled.

SQLite queries the VFS for WAL file existence on every read/write
operation. Since the Search module does not use WAL mode, intercepting
these calls in PrivmxExtFS::access() avoids unnecessary round-trips to
the server.
@kisielewski kisielewski self-assigned this May 28, 2026
@kisielewski kisielewski marked this pull request as ready for review May 28, 2026 20:16
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.

3 participants