Skip to content

Commit

Permalink
fix: fix getrange command bug (#2510)
Browse files Browse the repository at this point in the history
  • Loading branch information
luky116 authored Mar 14, 2024
1 parent 978b786 commit 4c11eb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/storage/src/redis_strings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,8 @@ Status Redis::Getrange(const Slice& key, int64_t start_offset, int64_t end_offse
Status Redis::GetrangeWithValue(const Slice& key, int64_t start_offset, int64_t end_offset,
std::string* ret, std::string* value, int64_t* ttl) {
*ret = "";
Status s = db_->Get(default_read_options_, key, value);
BaseKey base_key(key);
Status s = db_->Get(default_read_options_, base_key.Encode(), value);
if (s.ok()) {
ParsedStringsValue parsed_strings_value(value);
if (parsed_strings_value.IsStale()) {
Expand Down

0 comments on commit 4c11eb2

Please sign in to comment.