Skip to content

Commit 6ae3bdd

Browse files
nits
1 parent 4dbd5f3 commit 6ae3bdd

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

runtime/src/utils/buffer/paged/append.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@
1313
//!
1414
//! During initialization, the wrapper will back up over any page that is not accompanied by a
1515
//! 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.
1627
1728
use super::read::{PageReader, Replay};
1829
use crate::{
@@ -983,7 +994,7 @@ impl<B: Blob> Append<B> {
983994
/// The returned replay can be used to sequentially read all pages from the blob while ensuring
984995
/// all data passes integrity verification. CRCs are validated but not included in the output.
985996
///
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
987998
/// read it, but callers must still use [`sync`](Self::sync) if that data must survive a crash.
988999
pub async fn replay(&self, buffer_size: NonZeroUsize) -> Result<Replay<B>, Error> {
9891000
let logical_page_size = self.cache_ref.page_size();

0 commit comments

Comments
 (0)