Conversation
…s that do not match the document type (#8378) * Fix incoherent indexing w.r.t index filter for index creation vs. updates/writes * Add test for unified behavior * Load from correct key when replacing (rename) * Remove EVAL_EXPR_NULL * Fix bug - json index interferes with hash index and vice-versa * Remove unecessary initialization * Fix exists function * Revert the removal of EXPR_EVAL_NULL * Fix bad reuse of RLookUp and RLookUpRow * Remove split PRs' code * Remove more for splitting * Avoid loading and evaluating filter expressions for indexes that do not match the document type * Fix loaded document in rename flow * Align fix
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 8.4 #8598 +/- ##
==========================================
- Coverage 85.54% 85.51% -0.04%
==========================================
Files 337 337
Lines 53352 53352
Branches 11023 11023
==========================================
- Hits 45640 45623 -17
- Misses 7568 7586 +18
+ Partials 144 143 -1
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:
|
|
Approved by me. |



Summary
Backport of commit 27e2e31 from master to 8.4 branch.
This PR avoids loading and evaluating filter expressions for indexes that do not match the document type (e.g., HASH vs JSON), improving performance and correctness.
Related Jira: MOD-14336
Original PR: #8378
Conflicts Resolved
No conflicts - cherry-pick applied cleanly.
Pull Request opened by Augment Code with guidance from the PR author
Note
Medium Risk
Touches core indexing notification paths and changes how index rules are selected, which could affect which documents are updated/deleted in indexes if type detection is wrong. Scope is small and primarily adds a type check to avoid unnecessary work.
Overview
Release note: Improves indexing performance and correctness by only considering schema rules (and evaluating their
FILTERexpressions) for indexes whose configured document type (HASH vs JSON) matches the changed key.This threads the detected
DocumentTypethroughIndexes_FindMatchingSchemaRules/Indexes_DeleteMatchingWithSchemaRulesand updates keyspace-notification handling so deletions/updates avoid loading data for irrelevant index types (with aDocumentType_Unsupportedescape hatch for CRDT empty/deleted keys).Written by Cursor Bugbot for commit a57ff40. This will update automatically on new commits. Configure here.