[MOD-7949] Avoid lazy expire upon scan keys in background#5274
[MOD-7949] Avoid lazy expire upon scan keys in background#5274
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5274 +/- ##
==========================================
- Coverage 86.70% 86.68% -0.03%
==========================================
Files 193 193
Lines 34752 34752
==========================================
- Hits 30133 30126 -7
- Misses 4619 4626 +7 ☔ View full report in Codecov by Sentry. |
Co-authored-by: kei-nan <[email protected]>
…/redisearch/redisearch into avoid_lazy_expire_upon_scan_keys
…nce ft.debug cannot be dispatched to shard via cluster connection
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.8
git worktree add -d .worktree/backport-5274-to-2.8 origin/2.8
cd .worktree/backport-5274-to-2.8
git switch --create backport-5274-to-2.8
git cherry-pick -x 15ed0825e235323aafe7053be558dcd91ad2542d |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.10
git worktree add -d .worktree/backport-5274-to-2.10 origin/2.10
cd .worktree/backport-5274-to-2.10
git switch --create backport-5274-to-2.10
git cherry-pick -x 15ed0825e235323aafe7053be558dcd91ad2542d |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 8.0
git worktree add -d .worktree/backport-5274-to-8.0 origin/8.0
cd .worktree/backport-5274-to-8.0
git switch --create backport-5274-to-8.0
git cherry-pick -x 15ed0825e235323aafe7053be558dcd91ad2542d |
| env.cmd('DEBUG', 'SET-ACTIVE-EXPIRE', '0') | ||
| env.expect('HSET', 'doc:1', 't', 'bar').equal(1) | ||
| env.expect('HSET', 'doc:2', 't', 'arr').equal(1) | ||
| env.expect('EXPIRE', 'doc:1', '1').equal(1) |
There was a problem hiding this comment.
You can use hexpire to make the test faster.
Describe the changes in the pull request
Avoid lazy expired during background scan of keys upon creating the index to avoid potential propagation of multiple DEL commands within a transaction (that might cause cross slot violation down the road).
We disabled the monitoring of has field expiration by default since otherwise, we call HPEXPIRETIME on every indexing
of a document, which causes lazy expiration even if not intended (this should be changed anyway since it was causing performance regressions)
Mark if applicable