We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23a9a68 commit 34ee41aCopy full SHA for 34ee41a
src/lib.rs
@@ -87,6 +87,15 @@ impl CommitLog {
87
})
88
}
89
90
+ #[inline]
91
+ pub fn next_offset(&self) -> (u64, u64) {
92
+ if self.active_segment.len() >= self.max_segment_size as u64 {
93
+ (self.tail + 1, 0)
94
+ } else {
95
+ (self.tail, self.active_segment.len())
96
+ }
97
98
+
99
/// Get the number of segment on the disk.
100
#[inline]
101
pub fn disk_len(&self) -> io::Result<u64> {
0 commit comments