From 49e0fac3d0ff810fcd27a11d7211d50060feee1f Mon Sep 17 00:00:00 2001 From: Phoeniix Zhao Date: Mon, 24 Jul 2023 10:46:56 +0800 Subject: [PATCH] chore: resolve comments in pr 311 Signed-off-by: Phoeniix Zhao --- xline/src/server/kv_server.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xline/src/server/kv_server.rs b/xline/src/server/kv_server.rs index 84dd2c933..ccf9e3762 100644 --- a/xline/src/server/kv_server.rs +++ b/xline/src/server/kv_server.rs @@ -222,7 +222,7 @@ where range_revision: i64, compacted_revision: i64, ) -> Result<(), tonic::Status> { - (range_revision >= compacted_revision) + (range_revision <= 0 || range_revision >= compacted_revision) .then_some(()) .ok_or(tonic::Status::invalid_argument(format!( "required revision {range_revision} has been compacted, compacted revision is {compacted_revision}"