Skip to content

Commit

Permalink
refactor: generate revision for read only commands
Browse files Browse the repository at this point in the history
Signed-off-by: bsbds <[email protected]>
  • Loading branch information
bsbds authored and Phoenix500526 committed Jul 12, 2024
1 parent 76e60a2 commit 05954e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/xline/src/server/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,14 @@ impl CurpCommandExecutor<Command> for CommandExecutor {
let revision = match wrapper.backend() {
RequestBackend::Auth => {
if wrapper.skip_auth_revision() {
-1
self.auth_rev.get()
} else {
self.auth_rev.next()
}
}
RequestBackend::Kv | RequestBackend::Lease => {
if wrapper.skip_general_revision() {
-1
self.general_rev.get()
} else {
self.general_rev.next()
}
Expand Down

0 comments on commit 05954e0

Please sign in to comment.