Does yugabyte db fsync data to file?

How is data recovered after a crash?

Does yugabyte db fsync data to file?

Yes. YugabyteDB uses DocDB for persistence. DocDB is a LSM storage engine forked from RocksDB. In a single node scenario, on restart the process read the WAL to return in the state that it was when it crashed.

How is data recovered after a crash?

Each DML is synchronously replicated using RAFT algorithm and each replica writes to it’s own local Write Ahead Log.

When a node crashes, YugabyteDB picks a new leader tablet in the order of a couple of seconds. If the old node doesn’t come back online or it takes too long, tablet peers are replicated in other nodes of the cluster using a process called bootstraping until the replication factor is achieved for each tablet.