Expand description
Acknowledge primitives for durability tracking
In our storage system, an acknowledgement represents the eventual durability state of previously submitted write operation.
§Example
use frozen_core::ack::{AckTicket, Completion};
use std::sync::Arc;
let completion = Arc::new(Completion::default());
let epoch = completion.increment_current_epoch();
let ticket = AckTicket::new(epoch, completion.clone());
completion.mark_epoch_as_durable(epoch);
completion.notify_all_listeners();
let durable_epoch = futures::executor::block_on(ticket).unwrap();
assert_eq!(durable_epoch, epoch);Structs§
- AckTicket
- Durability handle associated with the write operation
- Completion
- A shared durability acknowledgement state used for issuing
AckTicket’s
Type Aliases§
- TEpoch
- A monotomically increasing epoch used as indentifier for tracking durability of write operations