# `Write` Operation
+ Foreground
  + Write to `Write Ahead Log (WAL)` first, then write to `memtable`
+ Background 
  + Flush full `memtable` to `Level 0` 
  + Compaction when a level is full
    + Leveled compaction: `L0 tiered + other partitioned leveled`
    + Universal compaction: `unpartitioned tiered`
    + `sub-compaction`
![`smart`](RocksDBSubCompact_aa_001_20222021.png)
------------------------------------------------------------

