Skip to content

MOD-8009: Allow Users To Configure Cursor Index Limitation Through Global Config#5137

Merged
kei-nan merged 14 commits intomasterfrom
master_jk_fix_cursor_limitation
Nov 5, 2024
Merged

MOD-8009: Allow Users To Configure Cursor Index Limitation Through Global Config#5137
kei-nan merged 14 commits intomasterfrom
master_jk_fix_cursor_limitation

Conversation

@kei-nan
Copy link
Collaborator

@kei-nan kei-nan commented Oct 30, 2024

  • move cursor limitation per index to be a configuration parameter
  • solve a bug where the coordinator would stop reading from internal cursors

A clear and concise description of what the PR is solving, including:

  1. The 128 cursor limitation is hard coded, coordinator relies on result length to determine if it is done
  2. Move the limitation to the configuration, coordinator should only rely on the cursor id being non zero
  3. User could update the cursor limitation, coordinator should continue reading from the internal cursors until the cursor is depleted.

Which issues this PR fixes

  1. MOD-8009

Main objects this PR modified

  1. Cursors

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes - changed the error message a bit

* solve a bug where the coordinator would stop reading from internal cursors
@kei-nan kei-nan force-pushed the master_jk_fix_cursor_limitation branch from de1ffd0 to 56d9a90 Compare October 30, 2024 10:24
@kei-nan kei-nan self-assigned this Oct 30, 2024
@kei-nan kei-nan requested a review from GuyAv46 October 30, 2024 10:27
@codecov
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 7 lines in your changes missing coverage. Please review.

Project coverage is 86.33%. Comparing base (2c037bc) to head (feb0b25).
Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
src/coord/dist_aggregate.c 82.35% 3 Missing ⚠️
src/coord/rmr/rmr.c 50.00% 3 Missing ⚠️
src/coord/rmr/chan.c 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5137      +/-   ##
==========================================
+ Coverage   86.30%   86.33%   +0.03%     
==========================================
  Files         190      190              
  Lines       34604    34632      +28     
==========================================
+ Hits        29864    29900      +36     
+ Misses       4740     4732       -8     

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

…return value is ignored and has no real meaning.
@kei-nan kei-nan requested a review from GuyAv46 October 31, 2024 08:31
@kei-nan kei-nan marked this pull request as draft October 31, 2024 09:38
@kei-nan kei-nan marked this pull request as ready for review October 31, 2024 09:38
@kei-nan kei-nan requested a review from raz-mon October 31, 2024 09:39
@kei-nan kei-nan requested review from GuyAv46 and oshadmi October 31, 2024 14:07
Copy link
Collaborator

@oshadmi oshadmi left a comment

Choose a reason for hiding this comment

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

Nice💪🏼

@kei-nan kei-nan added this pull request to the merge queue Nov 4, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 4, 2024
@kei-nan kei-nan added this pull request to the merge queue Nov 5, 2024
@kei-nan kei-nan removed this pull request from the merge queue due to a manual request Nov 5, 2024
@kei-nan kei-nan added this pull request to the merge queue Nov 5, 2024
Merged via the queue into master with commit 602fe76 Nov 5, 2024
@kei-nan kei-nan deleted the master_jk_fix_cursor_limitation branch November 5, 2024 15:09
@redisearch-backport-pull-request
Copy link
Contributor

Backport failed for 2.8, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 2.8
git worktree add -d .worktree/backport-5137-to-2.8 origin/2.8
cd .worktree/backport-5137-to-2.8
git switch --create backport-5137-to-2.8
git cherry-pick -x 602fe7685da6c853ce7e3ed4ff550caec58b9c07

@redisearch-backport-pull-request
Copy link
Contributor

Backport failed for 2.6, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 2.6
git worktree add -d .worktree/backport-5137-to-2.6 origin/2.6
cd .worktree/backport-5137-to-2.6
git switch --create backport-5137-to-2.6
git cherry-pick -x 602fe7685da6c853ce7e3ed4ff550caec58b9c07

@redisearch-backport-pull-request
Copy link
Contributor

Backport failed for 2.10, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 2.10
git worktree add -d .worktree/backport-5137-to-2.10 origin/2.10
cd .worktree/backport-5137-to-2.10
git switch --create backport-5137-to-2.10
git cherry-pick -x 602fe7685da6c853ce7e3ed4ff550caec58b9c07

redisearch-backport-pull-request bot pushed a commit that referenced this pull request Nov 5, 2024
…obal Config (#5137)

* * move cursor limitation per index to be a configuration parameter
* solve a bug where the coordinator would stop reading from internal cursors

* * remove int return type for iterate callback functions, since their return value is ignored and has no real meaning.

* * Code Review - Round #1

* * Code Review - Round #1, missing file change

* * fix crash in testAggregate.py

* * Code Review - Round #2

* * replace comma with a period

* * if we somehow ended up with a closed channel, free the reply

* Update src/config.c

Co-authored-by: GuyAv46 <[email protected]>

* Update src/cursor.c

Co-authored-by: Omer Shadmi <[email protected]>

* - fix channel test

* - add logging for the broadcasting failure flow

* - changed broadcast failure to be verbose instead of warning

* Update tests/pytests/test_cursors.py

Co-authored-by: Omer Shadmi <[email protected]>

---------

Co-authored-by: GuyAv46 <[email protected]>
Co-authored-by: Omer Shadmi <[email protected]>
(cherry picked from commit 602fe76)
@redisearch-backport-pull-request
Copy link
Contributor

kei-nan added a commit that referenced this pull request Nov 5, 2024
…obal Config (#5137)

* * move cursor limitation per index to be a configuration parameter
* solve a bug where the coordinator would stop reading from internal cursors

* * remove int return type for iterate callback functions, since their return value is ignored and has no real meaning.

* * Code Review - Round #1

* * Code Review - Round #1, missing file change

* * fix crash in testAggregate.py

* * Code Review - Round #2

* * replace comma with a period

* * if we somehow ended up with a closed channel, free the reply

* Update src/config.c

Co-authored-by: GuyAv46 <[email protected]>

* Update src/cursor.c

Co-authored-by: Omer Shadmi <[email protected]>

* - fix channel test

* - add logging for the broadcasting failure flow

* - changed broadcast failure to be verbose instead of warning

* Update tests/pytests/test_cursors.py

Co-authored-by: Omer Shadmi <[email protected]>

---------

Co-authored-by: GuyAv46 <[email protected]>
Co-authored-by: Omer Shadmi <[email protected]>
(cherry picked from commit 602fe76)
kei-nan added a commit that referenced this pull request Nov 5, 2024
…obal Config (#5137)

* * move cursor limitation per index to be a configuration parameter
* solve a bug where the coordinator would stop reading from internal cursors

* * remove int return type for iterate callback functions, since their return value is ignored and has no real meaning.

* * Code Review - Round #1

* * Code Review - Round #1, missing file change

* * fix crash in testAggregate.py

* * Code Review - Round #2

* * replace comma with a period

* * if we somehow ended up with a closed channel, free the reply

* Update src/config.c

Co-authored-by: GuyAv46 <[email protected]>

* Update src/cursor.c

Co-authored-by: Omer Shadmi <[email protected]>

* - fix channel test

* - add logging for the broadcasting failure flow

* - changed broadcast failure to be verbose instead of warning

* Update tests/pytests/test_cursors.py

Co-authored-by: Omer Shadmi <[email protected]>

---------

Co-authored-by: GuyAv46 <[email protected]>
Co-authored-by: Omer Shadmi <[email protected]>
(cherry picked from commit 602fe76)
kei-nan added a commit that referenced this pull request Nov 5, 2024
…obal Config (#5137)

* * move cursor limitation per index to be a configuration parameter
* solve a bug where the coordinator would stop reading from internal cursors

* * remove int return type for iterate callback functions, since their return value is ignored and has no real meaning.

* * Code Review - Round #1

* * Code Review - Round #1, missing file change

* * fix crash in testAggregate.py

* * Code Review - Round #2

* * replace comma with a period

* * if we somehow ended up with a closed channel, free the reply

* Update src/config.c

Co-authored-by: GuyAv46 <[email protected]>

* Update src/cursor.c

Co-authored-by: Omer Shadmi <[email protected]>

* - fix channel test

* - add logging for the broadcasting failure flow

* - changed broadcast failure to be verbose instead of warning

* Update tests/pytests/test_cursors.py

Co-authored-by: Omer Shadmi <[email protected]>

---------

Co-authored-by: GuyAv46 <[email protected]>
Co-authored-by: Omer Shadmi <[email protected]>
(cherry picked from commit 602fe76)
github-merge-queue bot pushed a commit that referenced this pull request Nov 5, 2024
…ugh Global Config (#5165)

MOD-8009: Allow Users To Configure Cursor Index Limitation Through Global Config (#5137)

* * move cursor limitation per index to be a configuration parameter
* solve a bug where the coordinator would stop reading from internal cursors

* * remove int return type for iterate callback functions, since their return value is ignored and has no real meaning.

* * Code Review - Round #1

* * Code Review - Round #1, missing file change

* * fix crash in testAggregate.py

* * Code Review - Round #2

* * replace comma with a period

* * if we somehow ended up with a closed channel, free the reply

* Update src/config.c

Co-authored-by: GuyAv46 <[email protected]>

* Update src/cursor.c

Co-authored-by: Omer Shadmi <[email protected]>

* - fix channel test

* - add logging for the broadcasting failure flow

* - changed broadcast failure to be verbose instead of warning

* Update tests/pytests/test_cursors.py

Co-authored-by: Omer Shadmi <[email protected]>

---------

Co-authored-by: GuyAv46 <[email protected]>
Co-authored-by: Omer Shadmi <[email protected]>
(cherry picked from commit 602fe76)

Co-authored-by: kei-nan <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Nov 5, 2024
…ugh Global Config (#5167)

* MOD-8009: Allow Users To Configure Cursor Index Limitation Through Global Config (#5137)

* * move cursor limitation per index to be a configuration parameter
* solve a bug where the coordinator would stop reading from internal cursors

* * remove int return type for iterate callback functions, since their return value is ignored and has no real meaning.

* * Code Review - Round #1

* * Code Review - Round #1, missing file change

* * fix crash in testAggregate.py

* * Code Review - Round #2

* * replace comma with a period

* * if we somehow ended up with a closed channel, free the reply

* Update src/config.c

Co-authored-by: GuyAv46 <[email protected]>

* Update src/cursor.c

Co-authored-by: Omer Shadmi <[email protected]>

* - fix channel test

* - add logging for the broadcasting failure flow

* - changed broadcast failure to be verbose instead of warning

* Update tests/pytests/test_cursors.py

Co-authored-by: Omer Shadmi <[email protected]>

---------

Co-authored-by: GuyAv46 <[email protected]>
Co-authored-by: Omer Shadmi <[email protected]>
(cherry picked from commit 602fe76)

* * fix config test
github-merge-queue bot pushed a commit that referenced this pull request Nov 6, 2024
…ough Global Config (#5166)

MOD-8009: Allow Users To Configure Cursor Index Limitation Through Global Config (#5137)

* * move cursor limitation per index to be a configuration parameter
* solve a bug where the coordinator would stop reading from internal cursors

* * remove int return type for iterate callback functions, since their return value is ignored and has no real meaning.

* * Code Review - Round #1

* * Code Review - Round #1, missing file change

* * fix crash in testAggregate.py

* * Code Review - Round #2

* * replace comma with a period

* * if we somehow ended up with a closed channel, free the reply

* Update src/config.c

Co-authored-by: GuyAv46 <[email protected]>

* Update src/cursor.c

Co-authored-by: Omer Shadmi <[email protected]>

* - fix channel test

* - add logging for the broadcasting failure flow

* - changed broadcast failure to be verbose instead of warning

* Update tests/pytests/test_cursors.py

Co-authored-by: Omer Shadmi <[email protected]>

---------

Co-authored-by: GuyAv46 <[email protected]>
Co-authored-by: Omer Shadmi <[email protected]>
(cherry picked from commit 602fe76)
github-merge-queue bot pushed a commit that referenced this pull request Nov 6, 2024
…ugh Global Config (#5168)

* MOD-8009: Allow Users To Configure Cursor Index Limitation Through Global Config (#5137)

* * move cursor limitation per index to be a configuration parameter
* solve a bug where the coordinator would stop reading from internal cursors

* * remove int return type for iterate callback functions, since their return value is ignored and has no real meaning.

* * Code Review - Round #1

* * Code Review - Round #1, missing file change

* * fix crash in testAggregate.py

* * Code Review - Round #2

* * replace comma with a period

* * if we somehow ended up with a closed channel, free the reply

* Update src/config.c

Co-authored-by: GuyAv46 <[email protected]>

* Update src/cursor.c

Co-authored-by: Omer Shadmi <[email protected]>

* - fix channel test

* - add logging for the broadcasting failure flow

* - changed broadcast failure to be verbose instead of warning

* Update tests/pytests/test_cursors.py

Co-authored-by: Omer Shadmi <[email protected]>

---------

Co-authored-by: GuyAv46 <[email protected]>
Co-authored-by: Omer Shadmi <[email protected]>
(cherry picked from commit 602fe76)

* * use RSGlobalConfig.indexCursorLimit

* * apply missing cherry-pick changes

* * fix netCursorCallback callback return type

* * code review comments + test crash fix

* * fix remaining code review comments
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.

4 participants