Skip to content

[8.4] MOD-12807, MOD-12808: Register Cursor Sub-Commands as such#7888

Merged
Itzikvaknin merged 3 commits into8.4from
manual-backport-6396-to-8.4
Dec 25, 2025
Merged

[8.4] MOD-12807, MOD-12808: Register Cursor Sub-Commands as such#7888
Itzikvaknin merged 3 commits into8.4from
manual-backport-6396-to-8.4

Conversation

@Itzikvaknin
Copy link
Collaborator

@Itzikvaknin Itzikvaknin commented Dec 24, 2025

Manual backport of #7571 to 8.4


Note

Register FT.CURSOR subcommands and refactor cursor handling

  • Split FT.CURSOR into true subcommands: READ, PROFILE, DEL, GC; register both external (FT.CURSOR) and internal (_FT.CURSOR) variants with cluster-safe dispatch
  • Replace monolithic RSCursorCommand with RSCursorReadCommand, RSCursorProfileCommand, RSCursorDelCommand, RSCursorGCCommand; adjust distributed wrappers and commandstats names
  • Change sendChunk_ReplyOnly_EmptyResults and cursor read paths to take RedisModuleCtx, internally create/end replies, and improve RESP2/RESP3 empty reply behavior and OOM warnings
  • Improve argument validation and error messages (bad/missing cursor id, unknown args/subcommands, wrong arity), and handle index-dropped cases
  • Update tests to new APIs/behaviors, including PROFILE handling, error texts, and GC edge cases

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

* split cursor command

* fix and improve tests

* cover error cases

* fix cursor leaks

* Add "TODO: run hybrid cursor" back

* remove new empty line

* small test improvement

* fix FT.CURSOR GC

* de-flake test

* make CURSOR PROFILE internal only
@codecov
Copy link

codecov bot commented Dec 24, 2025

Codecov Report

❌ Patch coverage is 97.80220% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.99%. Comparing base (7ba0c46) to head (a6e9806).
⚠️ Report is 7 commits behind head on 8.4.

Files with missing lines Patch % Lines
src/aggregate/aggregate_exec.c 98.59% 1 Missing ⚠️
src/module.c 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              8.4    #7888      +/-   ##
==========================================
- Coverage   86.00%   85.99%   -0.01%     
==========================================
  Files         331      331              
  Lines       53065    53380     +315     
  Branches    11998    11998              
==========================================
+ Hits        45637    45906     +269     
- Misses       7261     7307      +46     
  Partials      167      167              
Flag Coverage Δ
flow 84.61% <97.80%> (-0.09%) ⬇️
unit 52.33% <5.49%> (-0.25%) ⬇️

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.

@Itzikvaknin Itzikvaknin force-pushed the manual-backport-6396-to-8.4 branch from 9762018 to 7d55279 Compare December 24, 2025 15:55
@Itzikvaknin Itzikvaknin changed the title [8.4] MOD-13146, MOD-9573: FTCursor request policy [8.4] MOD-12807, MOD-12808: Register Cursor Sub-Commands as such Dec 24, 2025
@Itzikvaknin Itzikvaknin requested a review from GuyAv46 December 24, 2025 17:40
GuyAv46
GuyAv46 previously approved these changes Dec 25, 2025
@Itzikvaknin Itzikvaknin added this pull request to the merge queue Dec 25, 2025
Merged via the queue into 8.4 with commit a0936ea Dec 25, 2025
32 checks passed
@Itzikvaknin Itzikvaknin deleted the manual-backport-6396-to-8.4 branch December 25, 2025 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants