Skip to content

SQLite: harden durability, add multi-file tenancy, and enforce file-based configuration#2244

Merged
mysticmind merged 3 commits intomainfrom
sqlite_fixes
Feb 26, 2026
Merged

SQLite: harden durability, add multi-file tenancy, and enforce file-based configuration#2244
mysticmind merged 3 commits intomainfrom
sqlite_fixes

Conversation

@mysticmind
Copy link
Member

SQLite Changes Included

  • Durable scheduling fixes:
    • improved scheduled timestamp precision and SQLite time comparisons to avoid early dequeue edge cases
    • updated scheduled/expiry movement logic to be consistent and deterministic
  • GUID/id matching hardening:
    • normalized SQLite TEXT GUID comparisons in message-store batch operations (delete/reassign/dead-letter paths) to avoid case mismatch issues
  • Saga durability fixes:
    • made SQLite saga schema initialization transaction-safe
    • ensured saga schema/data-source setup works consistently without ad hoc warm-up logic
  • Breaking API simplification (intentional):
    • removed SQLite schema knobs that were misleading/not meaningful in practice
    • UseSqlitePersistenceAndTransport is now effectively connection-string focused
  • New SQLite multi-tenant support with separate files:
    • added tenant-aware message store resolution for per-tenant SQLite files
    • added tenant-aware queue sender/listener implementations for SQLite transport
    • queue setup/listening/sending now works across active tenant databases
  • Enforced file-based SQLite policy:
    • added centralized guard to reject in-memory SQLite connection strings (Mode=Memory, :memory: variants)
    • applied validation to primary config and tenant config paths (static, master-table seed, dynamic tenant source)
  • Test-suite consolidation and modernization:
    • moved SQLite tests to reusable file-based DB helpers
    • added simple black-box E2E workflows for message, transport, saga, and multi-tenant multi-file behavior
    • renamed workflow test files/classes to neutral names (no file_based* prefix)
  • Docs + mdsnippets updates:
    • updated SQLite durability guide to reflect connection-string-only/file-based direction
    • added/updated snippet-backed examples for transport, tenancy, tenant sends, and polling
    • removed in-memory recommendation from SQLite docs

Fix SQLite transport/message-store durability edge cases by normalizing GUID id matching, preserving sub-second scheduling precision, and using transaction-safe saga schema initialization with Weasel data sources.

Consolidate SqliteTests on reusable file-backed databases, replace the old file transport compliance fixture with explicit black-box message/transport/saga workflows, and remove unsupported SQLite schema knobs so transport configuration is connection-string only.
Enable SQLite multi-tenancy across separate database files by wiring tenant-aware message-store discovery and queue sender/listener behavior for transport operations.

Reject in-memory SQLite connection strings for primary and tenant configurations, add coverage for those guardrails, and refresh SQLite docs/snippets plus workflow test names to match the file-based strategy.
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