Implement checkpoint modes with docs/tests and reorganize project file layout
All checks were successful
NuGet Publish / build-and-pack (push) Successful in 46s
NuGet Publish / publish-to-gitea (push) Successful in 53s

This commit is contained in:
Joseph Doherty
2026-02-21 07:56:36 -05:00
parent 3ffd468c79
commit 4c6aaa5a3f
96 changed files with 744 additions and 249 deletions

View File

@@ -104,6 +104,27 @@ Operational procedures, diagnostics, and escalation are documented in:
- [`docs/runbook.md`](docs/runbook.md)
- [`docs/troubleshooting.md`](docs/troubleshooting.md)
## Checkpoint Modes
`DocumentDbContext` and `StorageEngine` support explicit checkpoint modes via `CheckpointMode`:
- `Passive`: non-blocking; skips if checkpoint lock is contended.
- `Full`: applies committed WAL pages and appends a checkpoint marker, without truncating WAL.
- `Truncate`: applies committed WAL pages and truncates WAL.
- `Restart`: truncate + WAL writer restart.
Example:
```csharp
using ZB.MOM.WW.CBDD.Core.Transactions;
var result = db.Checkpoint(CheckpointMode.Full);
if (!result.Executed)
{
// passive checkpoint can be skipped under contention
}
```
## Security And Compliance Posture
- CBDD relies on host and process-level access controls.