alizainx/intelligence-systems-skills/btree-lsm-wal-storage-engines
Claude Code and agent skill by alizainx/intelligence-systems-skills
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Database storage engines: Write-Ahead Logging (ARIES recovery), B+Tree latch crabbing & slotted pages, LSM-Tree (MemTable, SSTables, Bloom filters, Leveled Compaction).
Install
npx vskill@latest install alizainx/intelligence-systems-skills/btree-lsm-wal-storage-enginesSKILL.md
The same SKILL.md was published earlier as alizainx/intelligence-systems-skills/btree-lsm-wal-storage-engines.
btree-lsm-wal-storage-engines (ISS-163)
1. First-Principles Invariant
- ARIES Write-Ahead Logging & Torn-Page Law: Before flushing a dirty buffer-pool page $P$ to disk, all WAL records up to
P.pageLSNmust befsynced (flushedLSN >= P.pageLSN), and before acknowledgingCOMMITto a client, the transaction's commit WAL record must befsynced (flushedLSN >= commitLSN) withCRC32Cframe checksums.
2. Fast-Pass Low-Token Protocol (Web & Coding Agents)
- In LSM-Trees (
RocksDB/Pebblestyle), guard every immutable SSTable with a Block-Based Bloom Filter (10 bits/key->< 1%false-positive rate) and Fence Pointers (min_key..max_keyindex block in RAM) so point lookups skip99%of non-matching disk reads.
3. Zero-Bug & Zero-Vulnerability Guards
- Acquire B+Tree page latches using Latch Crabbing (lock parent -> lock child -> if child is safe against split/merge, immediately release parent latch) and never hold a page latch across disk I/O.
- Implement ARIES 3-phase crash recovery (
Analysis -> Redo (Repeating History from min RecLSN) -> Undo (in reverse LSN order emitting Compensation Log Records CLRs)) so repeated crashes during recovery remain idempotent. - Rate-limit background LSM compaction I/O and stall MemTable writes smoothly when
L0file count approaches the stall threshold to prevent latency cliffs. - Align slotted pages to
4 KiB/16 KiBhardware block boundaries and write checkpoints atomically via doublewrite buffers or CoW shadow paging to defeat torn page writes. - Verify crash consistency by killing/truncating the WAL mid-transaction and asserting zero committed data loss and zero corrupt pages.
4. Verification Gate
python3 -c 'import zlib, struct; ...'
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/btree-lsm-wal-storage-engines/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/alizainx/intelligence-systems-skills/btree-lsm-wal-storage-engines)