1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
use *;
/// Indicates that the following buffer corresponds
/// to a reservation for an in-memory operation that
/// failed to complete. It should be skipped during
/// recovery.
pub const FAILED_FLUSH: u8 = 0;
/// Indicates that the following buffer contains
/// valid data, stored inline.
pub const INLINE_FLUSH: u8 = 1;
/// Indicates that the following buffer contains
/// valid data, stored blobly.
pub const BLOB_FLUSH: u8 = 2;
/// Indicates that the following buffer is used
/// as padding to fill out the rest of the segment
/// before sealing it.
pub const SEGMENT_PAD: u8 = 3;
/// The EVIL_BYTE is written as a canary to help
/// detect torn writes.
pub const EVIL_BYTE: u8 = 6;
/// Log messages have a header of this length.
pub const MSG_HEADER_LEN: usize = 15;
/// Log segments have a header of this length.
pub const SEG_HEADER_LEN: usize = 10;
/// Log segments have a trailer of this length.
pub const SEG_TRAILER_LEN: usize = 10;
/// Log messages that are stored as external blobs
/// contain a value (in addition to their header)
/// of this length.
pub const BLOB_INLINE_LEN: usize = ;
/// The minimum number of items per segment.
/// Items larger than this fraction of an io_buf
/// will be stored as an off-log blob.
pub const MINIMUM_ITEMS_PER_SEGMENT: usize = 4;