diff --git a/core/src/kvs/tikv/mod.rs b/core/src/kvs/tikv/mod.rs index a4dbd5a7..913d52ee 100644 --- a/core/src/kvs/tikv/mod.rs +++ b/core/src/kvs/tikv/mod.rs @@ -394,7 +394,7 @@ impl super::api::Transaction for Transaction { where K: Into + Sprintable + Debug, { - // TiKV does not support verisoned queries. + // TiKV does not support versioned queries. if version.is_some() { return Err(Error::UnsupportedVersionedQueries); } diff --git a/core/src/kvs/tr.rs b/core/src/kvs/tr.rs index d9a1287d..ac03aa2d 100644 --- a/core/src/kvs/tr.rs +++ b/core/src/kvs/tr.rs @@ -352,6 +352,9 @@ impl Transactor { { let beg: Key = rng.start.into(); let end: Key = rng.end.into(); + if beg > end { + return Ok(vec![]); + } expand_inner!(&mut self.inner, v => { v.scan(beg..end, limit, version).await }) }