I’m curious about why when we keep a log for crash recovery why would we ever write the file content to the log instead of just keeping the file meta data in the log.
If we write the file content to the log instead of the disk if it succeeded wouldn’t that mean if we wrote it directly to disk it would’ve succeeded as well and if it failed when we recover from the log we also wouldn’t have the data fully written so we would have to roll back.
New contributor
Alan Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.