Skip to content

fix: fix ExpectedStale error when expired type is string - #2682

Merged
AlexStocks merged 2 commits into
OpenAtomFoundation:unstablefrom
wangshao1:fix/fix_expect_stale_error
May 29, 2024
Merged

fix: fix ExpectedStale error when expired type is string#2682
AlexStocks merged 2 commits into
OpenAtomFoundation:unstablefrom
wangshao1:fix/fix_expect_stale_error

Conversation

@wangshao1

Copy link
Copy Markdown
Collaborator

ExpectedStale didn't consider string type, so if the mismatched key type is string and it's expired, ExpectedStale returns wrong

@github-actions github-actions Bot added the ☢️ Bug Something isn't working label May 28, 2024
Comment thread src/storage/src/redis.h
@@ -406,19 +406,16 @@ class Redis {
auto meta_type = static_cast<enum DataType>(static_cast<uint8_t>(meta_value[0]));
if (meta_type == DataType::kZSets || meta_type == DataType::kSets || meta_type == DataType::kHashes) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里整体逻辑改为 switch-case 形式吧

@AlexStocks
AlexStocks merged commit 2962bf4 into OpenAtomFoundation:unstable May 29, 2024
AlexStocks added a commit that referenced this pull request May 29, 2024
byseea11 pushed a commit to byseea11/pikiwidb that referenced this pull request Sep 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.0.0 ☢️ Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants