CubDB.file_sync
You're seeing just the function
file_sync
, go back to CubDB module for more information.
Specs
file_sync(GenServer.server()) :: :ok
Performs a fsync
, forcing to flush all data that might be buffered by the OS
to disk.
Calling this function ensures that all writes up to this point are committed to disk, and will be available after a restart.
If CubDB
is started with the option auto_file_sync: true
, calling this
function is not necessary, as every write operation will be automatically
flushed to the storage device.
If this function is NOT called, the operative system will control when the file buffer is flushed to the storage device, which leads to better write performance, but might affect durability of recent writes in case of a sudden shutdown.