Summary
Add an opt-in durability mode for applications that require data to reach stable storage before dump_file() returns.
Current behavior
dump_file() writes, flushes the C++ stream, and renames the temporary file.
A stream flush does not necessarily guarantee that data or directory metadata has reached durable storage.
A system crash or power loss may still lose the latest write.
Expected behavior
The module should expose an optional durability policy.
Normal writes should remain lightweight by default.
Durable mode should use platform-specific synchronization where supported.
Scope
Suggested files
modules/json/include/vix/json/dumps.hpp
modules/json/tests/json_dumps_durability_test.cpp
- platform-specific implementation headers where needed.
Acceptance criteria
Non-goals
This issue does not include:
- database transaction guarantees;
- distributed replication;
- filesystem-independent durability guarantees;
- mandatory synchronization for every write.
Summary
Add an opt-in durability mode for applications that require data to reach stable storage before
dump_file()returns.Current behavior
dump_file()writes, flushes the C++ stream, and renames the temporary file.A stream flush does not necessarily guarantee that data or directory metadata has reached durable storage.
A system crash or power loss may still lose the latest write.
Expected behavior
The module should expose an optional durability policy.
Normal writes should remain lightweight by default.
Durable mode should use platform-specific synchronization where supported.
Scope
Suggested files
modules/json/include/vix/json/dumps.hppmodules/json/tests/json_dumps_durability_test.cppAcceptance criteria
Non-goals
This issue does not include: