Activate a compacted key-value generation recoverably
Crashing during compacted-file replacement leaves no selected log. Add a recoverable generation manifest.
- Focused work estimate
- 4h + prerequisites
- Priority in the scenario
- High
- Engineering practice
- Crash consistency · Manifests
Estimated field mix
- Storage systems70%
- Database engineering30%
Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.
Review it, then add it to your workspace.
The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.
Project context
Fictional desktop cache Pebble needs a small embedded key-value engine. Build against generated keys and bytes using an ordinary filesystem adapter; no production database replacement is implied.
Setup prerequisites
- Create a disposable local fixture directory.
- Implement fault injection for partial writes, sync failure and process restart.
Preceding work
Complete these dependencies, or supply their agreed outputs before taking this ticket.
- CKV-101 · Encode local key-value records with explicit length limits
- CKV-102 · Distinguish missing local keys from empty values
- CKV-103 · Build a local key-value index from validated log records
- CKV-104 · Declare local write acknowledgement after the durability barrier
- CKV-105 · Recover a torn key-value record at the end of the log
- CKV-106 · Represent key deletion as an ordered tombstone
- CKV-107 · Reject key-value batches that cannot commit atomically
- CKV-108 · Compact the local log without changing visible key values
Acceptance criteria
- One valid generation is selected
- Interrupted switch retains fallback
- Repeated recovery makes same choice
Implementation constraints
- Keep previous generation until activation is durable.
Verification to include
- Crash at switch boundaries
- Remove incomplete new generation
Deliverables
- Generation activation and crash tests
Rollout and recovery
Restore the last validated manifest and retain both files.
Value of the work
For the engineer: Practice storage formats, durability boundaries and corruption handling.
For the team: Inspect whether an engineer can state and test persistence guarantees.
Evidence boundaries
Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.
Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.