Skip to content

Commit cc085d9

Browse files
committed
comment
1 parent 178d6c5 commit cc085d9

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

  • storage/src/qmdb/immutable

storage/src/qmdb/immutable/mod.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@
55
//! - [fixed]: For fixed-size values.
66
//! - [variable]: For variable-size values.
77
//!
8+
//! # Inactivity floor
9+
//!
10+
//! Each commit carries an inactivity floor: a location before which the application
11+
//! declares operations are no longer needed. The floor is embedded in the operation
12+
//! log and included in the Merkle root, so all replicas processing the same operations
13+
//! arrive at the same floor.
14+
//!
15+
//! The floor controls two things:
16+
//! - **Pruning**: [`Immutable::prune`] only allows pruning up to the floor.
17+
//! - **Reconstruction**: on restart or sync, the snapshot is rebuilt from the floor
18+
//! onward. Keys set before the floor are not loaded into memory.
19+
//!
20+
//! The floor must be monotonically non-decreasing across commits and must not exceed
21+
//! the batch's total operation count. Pass `db.inactivity_floor_loc()` to keep the
22+
//! floor unchanged, or a higher value to advance it.
23+
//!
824
//! # Examples
925
//!
1026
//! ```ignore

0 commit comments

Comments
 (0)