You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kvrocks.apache.org by hu...@apache.org on 2023/07/13 12:02:48 UTC
[kvrocks] branch unstable updated: Fix version typo in variable name (#1591)
This is an automated email from the ASF dual-hosted git repository.
hulk pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new 0d230430 Fix version typo in variable name (#1591)
0d230430 is described below
commit 0d2304300b494898b1626a38dfc5fbafe523b5a3
Author: Binbin <bi...@qq.com>
AuthorDate: Thu Jul 13 20:02:41 2023 +0800
Fix version typo in variable name (#1591)
---
src/types/redis_zset.cc | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/types/redis_zset.cc b/src/types/redis_zset.cc
index 9d6ba9b6..bc0515ef 100644
--- a/src/types/redis_zset.cc
+++ b/src/types/redis_zset.cc
@@ -248,16 +248,16 @@ rocksdb::Status ZSet::RangeByRank(const Slice &user_key, const RangeRankSpec &sp
std::string score_bytes;
double score = !(spec.reversed) ? kMinScore : kMaxScore;
PutDouble(&score_bytes, score);
- std::string start_key, prefix_key, next_verison_prefix_key;
+ std::string start_key, prefix_key, next_version_prefix_key;
InternalKey(ns_key, score_bytes, metadata.version, storage_->IsSlotIdEncoded()).Encode(&start_key);
InternalKey(ns_key, "", metadata.version, storage_->IsSlotIdEncoded()).Encode(&prefix_key);
- InternalKey(ns_key, "", metadata.version + 1, storage_->IsSlotIdEncoded()).Encode(&next_verison_prefix_key);
+ InternalKey(ns_key, "", metadata.version + 1, storage_->IsSlotIdEncoded()).Encode(&next_version_prefix_key);
int removed_subkey = 0;
rocksdb::ReadOptions read_options = storage_->DefaultScanOptions();
LatestSnapShot ss(storage_);
read_options.snapshot = ss.GetSnapShot();
- rocksdb::Slice upper_bound(next_verison_prefix_key);
+ rocksdb::Slice upper_bound(next_version_prefix_key);
read_options.iterate_upper_bound = &upper_bound;
rocksdb::Slice lower_bound(prefix_key);
read_options.iterate_lower_bound = &lower_bound;
@@ -584,15 +584,15 @@ rocksdb::Status ZSet::Rank(const Slice &user_key, const Slice &member, bool reve
if (!s.ok()) return s.IsNotFound() ? rocksdb::Status::OK() : s;
double target_score = DecodeDouble(score_bytes.data());
- std::string start_score_bytes, start_key, prefix_key, next_verison_prefix_key;
+ std::string start_score_bytes, start_key, prefix_key, next_version_prefix_key;
double start_score = !reversed ? kMinScore : kMaxScore;
PutDouble(&start_score_bytes, start_score);
InternalKey(ns_key, start_score_bytes, metadata.version, storage_->IsSlotIdEncoded()).Encode(&start_key);
InternalKey(ns_key, "", metadata.version, storage_->IsSlotIdEncoded()).Encode(&prefix_key);
- InternalKey(ns_key, "", metadata.version + 1, storage_->IsSlotIdEncoded()).Encode(&next_verison_prefix_key);
+ InternalKey(ns_key, "", metadata.version + 1, storage_->IsSlotIdEncoded()).Encode(&next_version_prefix_key);
int rank = 0;
- rocksdb::Slice upper_bound(next_verison_prefix_key);
+ rocksdb::Slice upper_bound(next_version_prefix_key);
read_options.iterate_upper_bound = &upper_bound;
rocksdb::Slice lower_bound(prefix_key);
read_options.iterate_lower_bound = &lower_bound;