Back to Explore

pebble

public
master

AI Architecture

Sign in to run a focused analysis on specific parts of this codebase.

Sign in

Trigger

User calls DB.Set() or DB.Apply(batch)

1
APIGo

Batch creation

User creates a batch or uses a direct Set call which internally creates a batch.

(*Batch).Set(*Batch).Delete(*Batch).Merge
pebble
batch.go
2
DatabaseGo

WAL logging

Write batch to write-ahead log for durability before applying to memtable.

(*failoverWriter).WriteRecord(*LogWriter).WriteRecord
pebble/walpebble/record
wal/failover_writer.gorecord/log_writer.go
3
DatabaseGo

Apply to memtable

Insert keys into the in-memory skiplist memtable for fast access.

(*memTable).apply(*Skiplist).Add
pebblepebble/internal/arenaskl
mem_table.gointernal/arenaskl/skl.go
4
DatabaseGo

Update sequence number

Increment the database sequence number to provide MVCC versioning for snapshots.

(*DB).commit(*commitQueue).dequeue
pebble
db.gocommit.go
5
ProcessingGo

Check flush conditions

Check if memtable is full or flush is forced, trigger async flush if needed.

(*DB).maybeScheduleFlush(*DB).handleMemTableReservation
pebble
db.goflush_test.go

Analyzed 2/20/2026, 2:05:22 PM

Sign in to analyze your own repositories.

Sign in