I have not figured out what would be the best API set to do this, but I am thinking to add sync_wal operation which is analogue of fsync in file system. (wal: write ahead log, aka common hlog in Hibari)
As of v0.1.x, Hibari has option to specify whether enabling group commit or not only per table level. sync_wal operation (and maybe sync_wal do flag for write operations too) will make it possible to flush OS's dirty write buffer of the common hlog to a stable storage (HDD or SSD) only when necessary.
They might look like:
sync_wal/3
flush dirty write buffer of the common hlog to a disk, on each chain of bricks assigned to binary key prefix(es).
I have not figured out what would be the best API set to do this, but I am thinking to add
sync_wal
operation which is analogue offsync
in file system. (wal: write ahead log, aka common hlog in Hibari)As of v0.1.x, Hibari has option to specify whether enabling group commit or not only per table level.
sync_wal
operation (and maybesync_wal
do flag for write operations too) will make it possible to flush OS's dirty write buffer of the common hlog to a stable storage (HDD or SSD) only when necessary.They might look like:
sync_wal/3
sync_wal(table(), key_prefix()|[key_prefix()], timeout())
sync_wal | {sync_wal, boolean()}