Skip to content

Handle keyIsExpiredWithDictIndex to make it check for import mode#1368

Merged
enjoy-binbin merged 1 commit intovalkey-io:unstablefrom
enjoy-binbin:keyIsExpiredWithDictIndex
Nov 28, 2024
Merged

Handle keyIsExpiredWithDictIndex to make it check for import mode#1368
enjoy-binbin merged 1 commit intovalkey-io:unstablefrom
enjoy-binbin:keyIsExpiredWithDictIndex

Conversation

@enjoy-binbin
Copy link
Member

In #1326 we make KEYS can visit expired key in import-source state
by updating keyIsExpired to check for import mode. But after #1205,
we now use keyIsExpiredWithDictIndex to optimize and remove the
redundant dict_index, and keyIsExpiredWithDictIndex does not handle
this logic.

In this commit, we handle keyIsExpiredWithDictIndex to make it check
for import mode as well so that KEYS can visit the expired key.

In valkey-io#1326 we make KEYS can visit expired key in import-source state
by updating keyIsExpired to check for import mode. But after valkey-io#1205,
we now use keyIsExpiredWithDictIndex to optimize and remove the
redundant dict_index, and keyIsExpiredWithDictIndex does not handle
this logic.

In this commit, we handle keyIsExpiredWithDictIndex to make it check
for import mode as well so that KEYS can visit the expired key.

Signed-off-by: Binbin <[email protected]>
@codecov
Copy link

codecov bot commented Nov 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.75%. Comparing base (5d08149) to head (f08283f).
Report is 2 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1368      +/-   ##
============================================
+ Coverage     70.57%   70.75%   +0.17%     
============================================
  Files           117      117              
  Lines         63320    63324       +4     
============================================
+ Hits          44690    44802     +112     
+ Misses        18630    18522     -108     
Files with missing lines Coverage Δ
src/db.c 89.29% <100.00%> (+0.03%) ⬆️

... and 12 files with indirect coverage changes

@zuiderkwast
Copy link
Contributor

This one introduced some problem. :) Hopefully we just need a simple wait or something.

Daily test run Failure
🔥 Tests failed: "reply-schemas-validator" "test-alpine-jemalloc" "test-alpine-libc-malloc" "test-freebsd" "test-macos-latest" "test-rpm-distros-jemalloc" "test-rpm-distros-tls-module" "test-rpm-distros-tls-module-no-tls" "test-sanitizer-address" "test-sanitizer-undefined" "test-ubuntu-32bit" "test-ubuntu-jemalloc" "test-ubuntu-jemalloc-fortify" "test-ubuntu-libc-malloc" "test-ubuntu-no-malloc-usable-size" "test-ubuntu-tls" "test-ubuntu-tls-no-tls" "test-valgrind-no-malloc-usable-size-test" "test-valgrind-test"

@enjoy-binbin
Copy link
Member Author

The problem is introduced in 1326. And this pr is fixing it. See top comment for the background

@zuiderkwast
Copy link
Contributor

Ah, sorry. So next daily will pass for sure. 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants