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 1f29cf7 commit 4a94388Copy full SHA for 4a94388
src/notes/kvs/src/kv.rs
@@ -149,6 +149,7 @@ enum Command {
149
Remove { key: String },
150
}
151
152
+/// 定义支持的指令/日志
153
impl Command {
154
fn set(key: String, value: String) -> Self {
155
Command::Set { key, value }
@@ -162,8 +163,11 @@ impl Command {
162
163
/// 命令位置
164
#[derive(Debug)]
165
struct CommandPos {
166
+ /// 日志文件序号
167
gen: u64,
168
+ /// 日志在一个文件中的偏移量
169
pos: u64,
170
+ /// 日志的长度。一个指令就算是一条日志
171
len: u64,
172
173
0 commit comments