From 219f7216fbc182122d7b1a50d5773d88033bb402 Mon Sep 17 00:00:00 2001 From: Ted Mostly Date: Mon, 13 Nov 2023 13:24:18 +0800 Subject: [PATCH 1/2] no need convert to slice --- src/storage/src/redis_lists.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/src/redis_lists.cc b/src/storage/src/redis_lists.cc index 2743b0e94a..df3f412eee 100644 --- a/src/storage/src/redis_lists.cc +++ b/src/storage/src/redis_lists.cc @@ -251,7 +251,7 @@ Status RedisLists::LInsert(const Slice& key, const BeforeOrAfter& before_or_afte ListsDataKey start_data_key(key, version, current_index); for (iter->Seek(start_data_key.Encode()); iter->Valid() && current_index < parsed_lists_meta_value.right_index(); iter->Next(), current_index++) { - if (iter->value() == Slice(pivot)) { + if (iter->value() == pivot) { find_pivot = true; pivot_index = current_index; break; From edd21215bda6e34ba589b8e424d6404b399c7a47 Mon Sep 17 00:00:00 2001 From: Ted Mostly Date: Mon, 13 Nov 2023 13:44:20 +0800 Subject: [PATCH 2/2] Update src/storage/src/redis_lists.cc --- src/storage/src/redis_lists.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/src/redis_lists.cc b/src/storage/src/redis_lists.cc index df3f412eee..9edd4cf2ce 100644 --- a/src/storage/src/redis_lists.cc +++ b/src/storage/src/redis_lists.cc @@ -251,7 +251,7 @@ Status RedisLists::LInsert(const Slice& key, const BeforeOrAfter& before_or_afte ListsDataKey start_data_key(key, version, current_index); for (iter->Seek(start_data_key.Encode()); iter->Valid() && current_index < parsed_lists_meta_value.right_index(); iter->Next(), current_index++) { - if (iter->value() == pivot) { + if (iter->value() == pivot) { find_pivot = true; pivot_index = current_index; break;