Files
Baradb/docs/tr/lsm.md
T

48 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# LSM-Tree Depolama Motoru
Log-Structured Merge-Tree mimarisini kullanan BaraDB'deki birincil depolama motoru.
## Mimari
```
┌─────────────────────────────────────────────┐
│ Writes │
│ (append to WAL + MemTable) │
└─────────────────────────────────────────────┘
┌─────────────────────────────────────────────┐
│ MemTable │
│ (in-memory sorted buffer) │
└─────────────────────────────────────────────┘
┌─────────────────────────────────────────────┐
│ SSTable │
│ (sorted string table on disk) │
└─────────────────────────────────────────────┘
```
## Kullanım
```nim
import barabadb/storage/lsm
var db = newLSMTree("./data")
db.put("key1", cast[seq[byte]]("value1"))
let (found, value) = db.get("key1")
db.delete("key1")
db.close()
```
## Özellikler
- **Yazma için optimize**: Append-only log yapısı
- **Dayanıklılık**: WAL çökme kurtarma sağlar
- **Bloom Filter**: Hızlı negatif aramalar
- **Compaction**: Boyut katmanlı strateji
- **Page Cache**: Sık erişilen sayfalar için LRU önbellek