
Write-ahead log (WAL) ensures crash recovery by logging changes before applying them
Image: Mike McMillan/USFS, Public domain, via Wikimedia Commons
Write-ahead log (WAL) ensures crash recovery by logging changes before applying them
The WAL mechanism records changes before they're applied to the file system. This preemptive logging helps in maintaining data integrity during unexpected crashes. By having a log of pending changes, the system can recover to a consistent state after a crash.
Example
If a crash occurs while writing to a file, the WAL records the intended changes. Upon recovery, the system can replay the logged changes to restore the file to its intended state.
This process is crucial for data integrity and system reliability, ensuring that no data is lost or corrupted during unexpected failures.
log-probabilities are used instead of probabilities: avoids numerical underflow
Log-probabilities convert multiplications into additions, preventing numerical underflow
LSM trees optimize: write-heavy workloads by buffering writes in memory
LSM trees optimize write-heavy workloads by buffering writes in memory
RAG does: retrieves relevant documents before generating to reduce hallucination
RAG retrieves relevant documents before generating to reduce hallucination
to use log-transform: when data is right-skewed or spans multiple orders of magnitude
Log-transform: Apply when data is right-skewed or spans multiple orders of magnitude
branch prediction does: guesses which way an if-statement will go to keep the pipeline full
Speculative execution: Predicts if-statement outcomes to keep the pipeline full
Flashbulb memory
Flashbulb memories are vivid but not always accurate
One email a day: 5 concepts + the 5 stories that matter →
Swipe through 100 ML concepts daily
Open TickerNews