Repository navigation
RDM/DVLS migration requests: locking, SQL and facade compatibility, legacy codecs - #80
Merged
Marc-André Moreau (mamoreau-devolutions) merged 1 commit intoOct 7, 2026
Conversation
…ility, legacy codecs Locking: BEGIN IMMEDIATE and a deferred transaction's first write hold a cross-process writer reservation until the transaction ends; detect peer WAL commits by content token; honour busy timeout for cross-process waits (polite RESERVED wait in rollback-journal mode); surface lock errors as SqliteException SQLITE_BUSY; retryable busy commits. SQL/files: auto_vacuum no-op once tables exist, CURRENT_TIMESTAMP in upsert, CTE collation precedence, VACUUM INTO without the write lock, lazy locking_mode=EXCLUSIVE, ALTER TABLE ADD COLUMN text placement, read-only open without -shm, idle -wal/-shm cleanup on last close, 0-byte file open, busy_timeout/wal_autocheckpoint/journal_size_limit pragmas. Facade: text GUID binding, DbType.Guid strings, System.Data.SQLite keywords and type mapping, opt-in *ID heuristic, auto-enlist, wrong-key SQLite error text, LocalProvider reports Managed. Codecs: System.Data.SQLite RC4 and wxSQLite3 AES-128 codecs with detection, PageCodecCandidates, MatchesHeader, PageCodecKeyMismatchException, ChangePageCodec. Also fixes stale catalog visibility for DDL made by another connection, schema leaf packing hot spots, RDM/DVLS workload benchmarks, EF Core 10.0.12 / 9.0.20 pins and migration docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Marc-André Moreau (mamoreau-devolutions)
merged commit Oct 7, 2026
9651dab
into
master
11 checks passed
Marc-André Moreau (mamoreau-devolutions)
deleted the
claude/ahtola-requests-3fb462
branch
October 7, 2026 01:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the 36 fixes and improvements that Remote Desktop Manager and Devolutions Server asked for when moving to Ahtola v0.10.0. 32 are done; #13, #28, #32 and #34 are partial or handled differently (see below).
Locking and concurrency (#1–#6)
BEGIN IMMEDIATE, and a deferred transaction's first write, hold the cross-process write lock until the transaction ends.SqliteExceptionwith code 5 (SQLITE_BUSY).SQL compatibility (#7–#11, #17)
PRAGMA auto_vacuumdoes nothing once tables exist.CURRENT_TIMESTAMPis accepted in upserts.VACUUM INTOdoesn't take the write lock.locking_mode=EXCLUSIVEtakes its lock on the next statement.ALTER TABLE ADD COLUMNinserts the new column before the table constraints.Files and journal modes (#12–#16, #18)
-walbut no-shmfalls back to foreign read-only mode.-waland the-shmare removed, as native SQLite does. A WAL that still holds frames, or one next to replica artifacts, is kept.-walor-journalexists next to it.busy_timeout,wal_autocheckpointandjournal_size_limitare honoured.Journal Modekeyword creates a database in DELETE mode.ADO.NET facade (#19–#27)
BinaryGUID=Falsebinds GUIDs as text;DbType.Guidwith a string value is parsed.Type Mapping=SystemDataSQLiteoption. The*IDcolumn-name heuristic is now opt-in.GetValuereturns non-GUID content in aguidcolumn as stored.Ignore Unknown Keywords. Commands auto-enlist in the connection's transaction whenAuto Enlist Transactionis set (off by default).LocalProviderreportsManagedwhen the keyword is absent. BLOB columns still reportobjectby default (fix: treat omitted proto3 scalars in a logical-log range as zero #23), because DVLS stores text in BLOB columns.Page codecs (#28–#31)
Ahtola.Data.Sqlite.Codecsadds the System.Data.SQLite RC4 and wxSQLite3 AES-128 codecs, plusLegacyPageCodecs.Detect/DetectFile. Both are validated against files written by the native engines. SQLCipher v4 and ChaCha20 are not included: no native-written fixtures were available.PageCodecCandidatesandSelectedPageCodec.IPageCodec.MatchesHeaderandPageCodecKeyMismatchExceptionlet a codec report a wrong key separately from a corrupt file.ChangePageCodec(IPageCodec?): re-encrypts the file in place under an exclusive lock.CodecId, threading and ownership.Performance (#32, #33)
RdmDvlsWorkloadBenchmarkscompares Ahtola with Microsoft.Data.Sqlite + e_sqlite3. It covers the ladder, bulk insert, large text,LIKEscans and open, with each codec.Packaging and docs (#34–#36)
docs/migrating-from-sqlite-providers.md.dotnet-packages.md, the README and the WAL interoperability contract are updated.Also fixed
A second connection got "no such table" for a table another connection had just created. This bug predates this branch.
Tests
RdmDvlsCompatibilityTests(42) andLegacyPageCodecTests(13, with fixtures from RDM).validate-trimpasses with 0 Ahtola warnings.validate-project-closureand the package-closure script tests (16/16) pass.format-checkviolations. Violations that predate this branch remain.🤖 Generated with Claude Code