|
13 | 13 | //! |
14 | 14 | //! During initialization, the wrapper will back up over any page that is not accompanied by a |
15 | 15 | //! valid CRC, treating it as the result of an incomplete write that may be invalid. |
| 16 | +//! |
| 17 | +//! # Blob Semantics |
| 18 | +//! |
| 19 | +//! [Append] owns the physical page layout, read cache, and durability bookkeeping for the wrapped |
| 20 | +//! [Blob]. Cloned [Append] handles share that state and are safe to use concurrently. Raw [Blob] |
| 21 | +//! handles cloned before wrapping operate on physical bytes, including checksum records, rather |
| 22 | +//! than [Append]'s logical view, and they do not observe buffered data until it is flushed. |
| 23 | +//! |
| 24 | +//! Raw [Blob] handles must not be used to write, resize, or otherwise mutate the blob while an |
| 25 | +//! [Append] exists. Those mutations bypass the buffer and page cache, can invalidate checksum |
| 26 | +//! recovery, and are not covered by [Append]'s [`Blob::write_at_sync`] fast paths. |
16 | 27 |
|
17 | 28 | use super::read::{PageReader, Replay}; |
18 | 29 | use crate::{ |
@@ -983,7 +994,7 @@ impl<B: Blob> Append<B> { |
983 | 994 | /// The returned replay can be used to sequentially read all pages from the blob while ensuring |
984 | 995 | /// all data passes integrity verification. CRCs are validated but not included in the output. |
985 | 996 | /// |
986 | | - /// This is not a durability operation. Buffered data may be plainly written so the replay can |
| 997 | + /// This is not a durable operation. Buffered data may be plainly written so the replay can |
987 | 998 | /// read it, but callers must still use [`sync`](Self::sync) if that data must survive a crash. |
988 | 999 | pub async fn replay(&self, buffer_size: NonZeroUsize) -> Result<Replay<B>, Error> { |
989 | 1000 | let logical_page_size = self.cache_ref.page_size(); |
|
0 commit comments