Skip to content

Add redisearch_thpool_wait in redisearch_thpool_destroy [MOD-10105]#6303

Merged
lerman25 merged 2 commits intomasterfrom
omerL-add-wait-before-destroy
Jun 12, 2025
Merged

Add redisearch_thpool_wait in redisearch_thpool_destroy [MOD-10105]#6303
lerman25 merged 2 commits intomasterfrom
omerL-add-wait-before-destroy

Conversation

@lerman25
Copy link
Collaborator

Currently in redisearch_thpool_destroy we call redisearch_thpool_terminate_threadsimmediatly,
this can result in a race condition in bg indexing in which the thpool is destroyed before the bg indexing task started and thus creating a leak.
Validate gh-readonly-queue/2.10/pr-6294-e7ddc75819184ebfd0cc11cff3d1a6328f231996 · RediSearch/RediSearch@0123c19

@codecov
Copy link

codecov bot commented Jun 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.87%. Comparing base (b2b9387) to head (06aef69).
Report is 14 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6303      +/-   ##
==========================================
- Coverage   88.88%   88.87%   -0.02%     
==========================================
  Files         239      241       +2     
  Lines       40266    40793     +527     
  Branches     3165     3435     +270     
==========================================
+ Hits        35791    36254     +463     
- Misses       4440     4503      +63     
- Partials       35       36       +1     
Flag Coverage Δ
flow 82.20% <100.00%> (-0.67%) ⬇️
unit 46.34% <100.00%> (+0.56%) ⬆️

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.

@lerman25 lerman25 marked this pull request as draft June 12, 2025 12:44
@lerman25 lerman25 marked this pull request as ready for review June 12, 2025 12:44
@lerman25 lerman25 added this pull request to the merge queue Jun 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 12, 2025
@lerman25 lerman25 added this pull request to the merge queue Jun 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 12, 2025
@lerman25 lerman25 added this pull request to the merge queue Jun 12, 2025
Merged via the queue into master with commit 1f3a9c5 Jun 12, 2025
28 of 30 checks passed
@lerman25 lerman25 deleted the omerL-add-wait-before-destroy branch June 12, 2025 20:01
@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-6303-to-2.8 origin/2.8
cd .worktree/backport-6303-to-2.8
git switch --create backport-6303-to-2.8
git cherry-pick -x 1f3a9c56de71cf8b58d3d4615fbb092382aa78bb

@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-6303-to-2.6 origin/2.6
cd .worktree/backport-6303-to-2.6
git switch --create backport-6303-to-2.6
git cherry-pick -x 1f3a9c56de71cf8b58d3d4615fbb092382aa78bb

redisearch-backport-pull-request bot pushed a commit that referenced this pull request Jun 12, 2025
…6303)

* Add wait

* remove unnecessary check

(cherry picked from commit 1f3a9c5)
@redisearch-backport-pull-request
Copy link
Contributor

Successfully created backport PR for 2.10:

@redisearch-backport-pull-request
Copy link
Contributor

Successfully created backport PR for 8.0:

redisearch-backport-pull-request bot pushed a commit that referenced this pull request Jun 12, 2025
…6303)

* Add wait

* remove unnecessary check

(cherry picked from commit 1f3a9c5)
github-merge-queue bot pushed a commit that referenced this pull request Jun 12, 2025
…105] (#6310)

Add redisearch_thpool_wait in redisearch_thpool_destroy [MOD-10105] (#6303)

* Add wait

* remove unnecessary check

(cherry picked from commit 1f3a9c5)

Co-authored-by: lerman25 <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Jun 13, 2025
…0105] (#6309)

Add redisearch_thpool_wait in redisearch_thpool_destroy [MOD-10105] (#6303)

* Add wait

* remove unnecessary check

(cherry picked from commit 1f3a9c5)

Co-authored-by: lerman25 <[email protected]>
lerman25 added a commit that referenced this pull request Jun 15, 2025
…6303)

* Add wait

* remove unnecessary check

(cherry picked from commit 1f3a9c5)
lerman25 added a commit that referenced this pull request Jun 15, 2025
…6303)

* Add wait

* remove unnecessary check

(cherry picked from commit 1f3a9c5)
github-merge-queue bot pushed a commit that referenced this pull request Jun 15, 2025
…105] (#6316)

* Add redisearch_thpool_wait in redisearch_thpool_destroy [MOD-10105] (#6303)

* Add wait

* remove unnecessary check

(cherry picked from commit 1f3a9c5)

* free mutex
github-merge-queue bot pushed a commit that referenced this pull request Jun 16, 2025
…105] (#6315)

* Add redisearch_thpool_wait in redisearch_thpool_destroy [MOD-10105] (#6303)

* Add wait

* remove unnecessary check

(cherry picked from commit 1f3a9c5)

* remove double
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