Skip to content

[2.8] Fix cursor logical leak - [MOD-12807]#7687

Merged
GuyAv46 merged 2 commits into2.8from
backport-7667-to-2.8
Dec 9, 2025
Merged

[2.8] Fix cursor logical leak - [MOD-12807]#7687
GuyAv46 merged 2 commits into2.8from
backport-7667-to-2.8

Conversation

@GuyAv46
Copy link
Collaborator

@GuyAv46 GuyAv46 commented Dec 9, 2025

Description

Manual backport of #7667 to 2.8.


Note

Ensure cursors are cleaned up and a clear error is returned when an index is dropped while a cursor is idle; also pause cursors when PROFILE is requested on a non-profile cursor.

  • Cursor management (src/aggregate/aggregate_exec.c):
    • On FT.CURSOR READ, if the cursor’s spec weak ref cannot be promoted (index dropped), immediately Cursor_Free(cursor) and reply with error: "The index was dropped while the cursor was idle".
    • In FT.CURSOR PROFILE, when the cursor request is not profile, call Cursor_Pause(cursor) before replying with an error.
  • Tests:
    • Add test_mod_12807 validating error message and cursor cleanup after dropping the index during an active cursor session.

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

* add a failing test

* fix

(cherry picked from commit 461908e)
@GuyAv46 GuyAv46 force-pushed the backport-7667-to-2.8 branch from 82e7565 to 093cc70 Compare December 9, 2025 09:49
@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.59%. Comparing base (b24a354) to head (093cc70).
⚠️ Report is 1 commits behind head on 2.8.

Additional details and impacted files
@@            Coverage Diff             @@
##              2.8    #7687      +/-   ##
==========================================
- Coverage   87.59%   87.59%   -0.01%     
==========================================
  Files         203      203              
  Lines       35119    35119              
==========================================
- Hits        30764    30762       -2     
- Misses       4355     4357       +2     
Flag Coverage Δ
flow 81.98% <100.00%> (-0.22%) ⬇️
unit 42.32% <0.00%> (ø)

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.

@GuyAv46 GuyAv46 added this pull request to the merge queue Dec 9, 2025
Merged via the queue into 2.8 with commit 791bc86 Dec 9, 2025
13 checks passed
@GuyAv46 GuyAv46 deleted the backport-7667-to-2.8 branch December 9, 2025 11:09
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