alizainx/intelligence-systems-skills/btree-lsm-wal-storage-engines

Claude Code and agent skill by alizainx/intelligence-systems-skills

Trust tier 2
  • community
LLM review pending
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-engines

SKILL.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.pageLSN must be fsynced (flushedLSN >= P.pageLSN), and before acknowledging COMMIT to a client, the transaction's commit WAL record must be fsynced (flushedLSN >= commitLSN) with CRC32C frame checksums.

2. Fast-Pass Low-Token Protocol (Web & Coding Agents)

  • In LSM-Trees (RocksDB/Pebble style), guard every immutable SSTable with a Block-Based Bloom Filter (10 bits/key -> < 1% false-positive rate) and Fence Pointers (min_key..max_key index block in RAM) so point lookups skip 99% of non-matching disk reads.

3. Zero-Bug & Zero-Vulnerability Guards

  1. 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.
  2. 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.
  3. Rate-limit background LSM compaction I/O and stall MemTable writes smoothly when L0 file count approaches the stall threshold to prevent latency cliffs.
  4. Align slotted pages to 4 KiB / 16 KiB hardware block boundaries and write checkpoints atomically via doublewrite buffers or CoW shadow paging to defeat torn page writes.
  5. 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/alizainx/intelligence-systems-skills/btree-lsm-wal-storage-engines/badge)](https://verified-skill.com/skills/alizainx/intelligence-systems-skills/btree-lsm-wal-storage-engines)

Something wrong with this skill or its page? Tell us.