Avoid lazy expiration in background indexing for CRDT [MOD-9486]#6002
Avoid lazy expiration in background indexing for CRDT [MOD-9486]#6002
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6002 +/- ##
==========================================
- Coverage 88.24% 88.21% -0.04%
==========================================
Files 220 220
Lines 39516 39516
Branches 2780 2780
==========================================
- Hits 34871 34858 -13
- Misses 4636 4649 +13
Partials 9 9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Did we validate it with the CRDT team? |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue in background indexing for CRDT by ensuring that keys opened for CRDT are always opened with the proper flags to avoid lazy expiration.
- Update condition to force reopening keys for CRDT using the 'noeffect' flag.
- Adjust comment text and order to improve clarity around document type checking and key closing.
…pire-CRDT-crdtOnly
There was a problem hiding this comment.
Pull Request Overview
This PR addresses the lazy expiration issue during background indexing for CRDT by ensuring that keys for CRDT are always opened with the noeffect flag, avoiding side effects during type checks. The key changes include:
- Updating the conditional to re-open the key if operating on CRDT.
- Rearranging the document type check to occur after closing the key when necessary.
- Modifying comments to better describe the steps in key handling for indexing.
Comments suppressed due to low confidence (1)
src/spec.c:2236
- The updated conditional re-opens the key when 'isCrdt' is true, even if 'key' is already non-null. Please verify that this behavior is intended and add a comment clarifying that re-opening is necessary to apply the 'noeffect' flag for CRDT keys.
if (!key || isCrdt) {
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.8
git worktree add -d .worktree/backport-6002-to-2.8 origin/2.8
cd .worktree/backport-6002-to-2.8
git switch --create backport-6002-to-2.8
git cherry-pick -x 17193a5eed07f2bc43cb3fdfa4166f9466277209 |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.6
git worktree add -d .worktree/backport-6002-to-2.6 origin/2.6
cd .worktree/backport-6002-to-2.6
git switch --create backport-6002-to-2.6
git cherry-pick -x 17193a5eed07f2bc43cb3fdfa4166f9466277209 |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.10
git worktree add -d .worktree/backport-6002-to-2.10 origin/2.10
cd .worktree/backport-6002-to-2.10
git switch --create backport-6002-to-2.10
git cherry-pick -x 17193a5eed07f2bc43cb3fdfa4166f9466277209 |
* fix leak + open alawys on crdt * complete comment * format (cherry picked from commit 17193a5)
|
Successfully created backport PR for |
* fix leak + open alawys on crdt * complete comment * format (cherry picked from commit 17193a5)
* fix leak + open alawys on crdt * complete comment * format (cherry picked from commit 17193a5)
* fix leak + open alawys on crdt * complete comment * format (cherry picked from commit 17193a5)
#6055) Avoid lazy expiration in background indexing for CRDT [MOD-9486] (#6002) * fix leak + open alawys on crdt * complete comment * format (cherry picked from commit 17193a5) Co-authored-by: lerman25 <[email protected]>
* fix leak + open alawys on crdt * complete comment * format
* fix leak + open alawys on crdt * complete comment * format
* fix leak + open alawys on crdt * complete comment * format
Currently, during the background scan, using RM_KeyType to check the key type causes the key to expire in CRDT, due to CRDT's RM_KeyType function.
To solve, if we are on crdt, we open the key in the scan with the noeffect flag.
This continues the work from #5274.