From 107a9ba5b87cd3f0958728c9841c2ba8f3ec8db7 Mon Sep 17 00:00:00 2001 From: Francesco Cozzuto Date: Sun, 22 Feb 2026 22:02:20 +0100 Subject: [PATCH] Add TODO --- TODO.txt | 3 ++- src/wal.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/TODO.txt b/TODO.txt index f8f67c1..3d20333 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,3 +1,4 @@ [ ] Add log compaction [ ] Add log persistence -[ ] Add chunk locations to metadata \ No newline at end of file +[ ] Add chunk locations to metadata +[ ] fsync parent directory when renaming log \ No newline at end of file diff --git a/src/wal.c b/src/wal.c index ae7cc24..ad2b09d 100644 --- a/src/wal.c +++ b/src/wal.c @@ -266,6 +266,8 @@ int wal_replace(WAL *wal, WALEntry *entries, int count) if (rename_file_or_dir(tmp_path, wal_path) < 0) return -1; + // TODO: fsync on parent directory + // Reopen the WAL file and seek to end for future appends. Handle new_handle; if (file_open(wal_path, &new_handle) < 0)