MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rioSetAutoSync

Function rioSetAutoSync

app/redis-6.2.6/src/rio.c:399–402  ·  view source on GitHub ↗

Set the file-based rio object to auto-fsync every 'bytes' file written. * By default this is set to zero that means no automatic file sync is * performed. * * This feature is useful in a few contexts since when we rely on OS write * buffers sometimes the OS buffers way too much, resulting in too many * disk I/O concentrated in very little time. When we fsync in an explicit * way instead the

Source from the content-addressed store, hash-verified

397 * disk I/O concentrated in very little time. When we fsync in an explicit
398 * way instead the I/O pressure is more distributed across time. */
399void rioSetAutoSync(rio *r, off_t bytes) {
400 if(r->write != rioFileIO.write) return;
401 r->io.file.autosync = bytes;
402}
403
404/* --------------------------- Higher level interface --------------------------
405 *

Callers 2

rdbSaveFunction · 0.85
rewriteAppendOnlyFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected