Add WAL persistence to VSR log
Port the Write-Ahead Log implementation from raft/ into the VSR server. Log entries are now written to disk with FNV-1a checksums and fsynced before updating in-memory state. On startup, the WAL file is loaded and validated, replacing the boot marker for crash detection. View changes and recovery use atomic rename (tmp.log -> vsr.log) to replace the WAL safely. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,20 +15,20 @@ SHARED_LIB = libtoastyfs.so
|
||||
# ---- Server binary ----
|
||||
|
||||
SERVER_SRCS = src/basic.c src/file_system.c src/byte_queue.c src/message.c \
|
||||
src/tcp.c src/server.c src/main.c src/log.c src/client_table.c \
|
||||
src/tcp.c src/server.c src/main.c src/wal.c src/client_table.c \
|
||||
src/chunk_store.c src/metadata.c
|
||||
|
||||
# ---- Client binary (random test client) ----
|
||||
|
||||
CLIENT_SRCS = src/basic.c src/file_system.c src/byte_queue.c src/message.c \
|
||||
src/tcp.c src/server.c src/client.c src/random_client.c src/main.c \
|
||||
src/log.c src/client_table.c src/chunk_store.c src/metadata.c
|
||||
src/wal.c src/client_table.c src/chunk_store.c src/metadata.c
|
||||
|
||||
# ---- Simulation binary ----
|
||||
|
||||
SIM_SRCS = src/basic.c src/file_system.c src/byte_queue.c src/message.c \
|
||||
src/tcp.c src/server.c src/client.c src/random_client.c src/main.c \
|
||||
src/log.c src/client_table.c src/invariant_checker.c src/chunk_store.c \
|
||||
src/wal.c src/client_table.c src/invariant_checker.c src/chunk_store.c \
|
||||
src/metadata.c quakey/src/mockfs.c quakey/src/quakey.c
|
||||
|
||||
# ---- Default target ----
|
||||
|
||||
Reference in New Issue
Block a user