No description
  • C++ 96.9%
  • Shell 3%
Find a file
SquareWinter58 c9649f9e9d sstable: delete compacted inputs once no reader can name them
Compaction took its inputs out of the manifest and left the files on disk
forever. Spec 6.7 allows deleting them once they are unlisted and no Version
references them, so count the readers and act on it.

A get () holds active_readers from before it copies the manifest until it has
finished reading the files that copy names, so a reader that can still name a
file was already counted when that file left the manifest, and a reader that
starts later copies a manifest that no longer has it. remove_from_manifest
queues the paths instead of unlinking, and sweep_pending_deletes -- run from
the compaction thread's one second tick -- unlinks them when the count is zero.

pending_deletes is memory only, so sweep_orphans covers what a crash leaves
behind: *.sst.tmp always, and any *.sst the manifest does not name, skipped
entirely when manifest.json is missing since that is a lost manifest rather
than a store full of orphans.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-02 14:33:06 +00:00
cmd/lsmkv engine, server: publish versions so reads work, and stop dying on errors 2026-07-30 15:26:23 +00:00
config added compaction 2026-08-02 12:20:41 +02:00
internal sstable: delete compacted inputs once no reader can name them 2026-08-02 14:33:06 +00:00
tests for now put and del works but i found the bug when rolling over to the next wal file and one more when rereading big wal file it never updates the memtable nor does it work for now 2026-07-19 21:41:03 +02:00
.clang-format added more args in manifest and versions e.g. snapshots 2026-07-30 15:22:25 +02:00
.gitignore fixed some bugs in flushing immutables 2026-07-27 17:39:17 +02:00
bench.sh fixed some bugs in flushing immutables 2026-07-27 17:39:17 +02:00
meson.build added thread write safety so now anybody can read as much as they want but only one client can write at the time 2026-04-07 15:42:50 +02:00