This is an automated email from the ASF dual-hosted git repository. hulk pushed a commit to branch 2.5 in repository https://gitbox.apache.org/repos/asf/kvrocks.git
commit a27edb2310ece47fb25fd2c9782278fdc0de7157 Author: Binbin <[email protected]> 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 e38e734b..38d40e83 100644 --- a/src/types/redis_zset.cc +++ b/src/types/redis_zset.cc @@ -249,16 +249,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; 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; @@ -588,15 +588,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;
