1.8 KiB
1.8 KiB
Storage And Transactions
Purpose And Business Outcome
Provide durable, ACID-compliant local persistence for embedded workloads that need consistent commit and recovery semantics.
Scope And Non-Goals
Scope:
- Page-based storage
- Write-ahead logging
- Transaction lifecycle and commit/rollback semantics
Non-goals:
- Distributed transactions
- Multi-node replication
User And System Workflows
- Application writes through
DocumentDbContext. - Engine records WAL entries.
- Commit persists pages and marks transaction durable.
- Recovery replays WAL to restore committed state after restart.
Interfaces And APIs
DocumentDbContextTransactionandITransactionWriteAheadLog- Storage engine modules under
src/CBDD.Core/Storage
Permissions And Data Handling
- Database files require host-managed filesystem access controls.
- Transaction data should be treated as sensitive if payloads contain regulated information.
Dependencies And Failure Modes
Dependencies:
- Local filesystem I/O
- WAL and page file consistency
Failure modes:
- Interrupted writes
- Corrupted WAL entries
- Invalid page metadata after unsafe process termination
Monitoring, Alerts, And Troubleshooting
- Use CI/test failures and incident issues as primary signals.
- Follow
../runbook.mdfor triage. - Follow
../security.mdfor data handling and control requirements. - Use
../troubleshooting.mdfor recovery issues.
Rollout And Change Considerations
- Any storage format or WAL behavior change requires migration and rollback validation.
- Release notes must document backward compatibility impact.
Validation Guidance
- Run transaction and recovery tests in
tests/CBDD.Tests. - Execute
dotnet test CBDD.slnx -c Releasebefore merge.