The state in memory is saved to an LMDB file, store/data.mdb, four times a second. This is a checkpoint, and no client waits for it: it only decides how much of the log a restart has to replay.
Every value carries a checksum, and the node checks all of them at boot. Every 6 hours a background scan reads the whole store again, to find damage before a restart does.
Traces have their own LMDB file, traces/data.mdb.