Skip to content

MOD-14328: [8.6] Notification handler for rename is loading the wrong key#8589

Merged
raz-mon merged 1 commit into8.6from
backport-MOD-14062-to-8.6
Mar 5, 2026
Merged

MOD-14328: [8.6] Notification handler for rename is loading the wrong key#8589
raz-mon merged 1 commit into8.6from
backport-MOD-14062-to-8.6

Conversation

@raz-mon
Copy link
Copy Markdown
Collaborator

@raz-mon raz-mon commented Mar 4, 2026

Backport of #8377 to 8.6 branch.

Original ticket: MOD-14062
Backport ticket: MOD-14328


Co-authored by Augment Code


Pull Request opened by Augment Code with guidance from the PR author


Note

Medium Risk
Touches keyspace notification rename handling and filter evaluation, which can affect whether documents are (de)indexed during RENAME across prefixes. Risk is mitigated by added coverage for cross-index renames with field-based filters and no-op renames.

Overview
Fixes a RENAME edge case where index FILTER expressions could be evaluated against the wrong key after a rename, causing incorrect indexing (or crashes) when moving documents between index prefixes.

Adds regression tests covering renames between indexes with field-value filters (including cases where the target filter should exclude the document) and RENAME no-op behavior.

Written by Cursor Bugbot for commit b1c5cad. This will update automatically on new commits. Configure here.

* Fix loaded document in rename flow

* Address review

* Add test
@github-actions github-actions Bot added the size:M label Mar 4, 2026
@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented Mar 4, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

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.

Comment thread src/spec.c
if (runFilters) {
// We load the data from the `keyToReadData` key, which is the key the old
// key was changed to, since the old key is already deleted.
key_p = RedisModule_StringPtrLen(keyToReadData, NULL);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing GitHub release note for this PR

Low Severity

Per project review rules, a GitHub release note is needed for this PR. Suggested release note: "Fixed a bug where the RENAME notification handler for indexes with FILTER expressions would attempt to read field data from the already-deleted old key instead of the new key, causing filters to fail during rename operations between indexes."

Fix in Cursor Fix in Web

Triggered by project rule: Please assist in writing a GitHub release note for this PR, which is concise and focused on the user impact.

@raz-mon raz-mon requested review from nafraf and oshadmi March 4, 2026 10:03
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 4, 2026

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.85%. Comparing base (88b3f4e) to head (b1c5cad).
⚠️ Report is 1 commits behind head on 8.6.

Additional details and impacted files
@@            Coverage Diff             @@
##              8.6    #8589      +/-   ##
==========================================
+ Coverage   83.83%   83.85%   +0.02%     
==========================================
  Files         367      367              
  Lines       55649    55650       +1     
  Branches    14319    14319              
==========================================
+ Hits        46656    46668      +12     
+ Misses       8832     8821      -11     
  Partials      161      161              
Flag Coverage Δ
flow 84.78% <100.00%> (+0.02%) ⬆️
unit 50.59% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator Author

@raz-mon raz-mon left a comment

Choose a reason for hiding this comment

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

Reviewed and approved by myself (can't approve my own PR)

@raz-mon raz-mon added this pull request to the merge queue Mar 5, 2026
Merged via the queue into 8.6 with commit 35810c5 Mar 5, 2026
47 of 50 checks passed
@raz-mon raz-mon deleted the backport-MOD-14062-to-8.6 branch March 5, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants