Skip to content

backport: [ClusterPipeline] ExecutorService/thread is created and destroyed too frequently in ClusterPipeline#4480

Merged
ggivo merged 1 commit into7.4.xfrom
topic/ggivo/backport-7.4.x-4479-cluster-pipeline-external-executor
Apr 2, 2026
Merged

backport: [ClusterPipeline] ExecutorService/thread is created and destroyed too frequently in ClusterPipeline#4480
ggivo merged 1 commit into7.4.xfrom
topic/ggivo/backport-7.4.x-4479-cluster-pipeline-external-executor

Conversation

@ggivo
Copy link
Copy Markdown
Collaborator

@ggivo ggivo commented Apr 2, 2026

Backport #4479 to 7.4.x


Note

Medium Risk
Changes multi-node cluster pipelining to optionally reuse a caller-provided ExecutorService, affecting concurrency and thread lifecycle; mistakes could cause deadlocks or thread leaks, though coverage is added.

Overview
Adds support for shared executors in cluster pipelining so multi-node sync() can reuse a caller-provided ExecutorService instead of creating/shutting down a thread pool per sync.

JedisCluster and RedisClusterClient now expose pipelined(ExecutorService) and route pipelined() through it; ClusterPipeline/MultiNodePipelineBase are updated to accept and retain an optional shared executor and only shut down dedicated executors.

Extends ClusterPipeliningTest with integration tests verifying the shared executor isn’t shut down, works for single-node-slot pipelines, and avoids deadlock under concurrent pipelines sharing a small thread pool.

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

…troyed too frequently in ClusterPipeline #4479

(cherry picked from commit 7744cd4)
@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented Apr 2, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 2, 2026

Test Results

   302 files  ±0     302 suites  ±0   11m 10s ⏱️ -24s
10 927 tests  - 3  10 055 ✅  - 660  872 💤 +657  0 ❌ ±0 
 5 636 runs   - 9   5 345 ✅  - 233  291 💤 +224  0 ❌ ±0 

Results for commit bf1711b. ± Comparison against base commit c37b259.

This pull request removes 7 and adds 4 tests. Note that renamed tests count towards both.
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest ‑ testScorer(Scorer, double, double)[1]
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest ‑ testScorer(Scorer, double, double)[2]
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest ‑ testScorer(Scorer, double, double)[3]
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest ‑ testScorer(Scorer, double, double)[4]
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest ‑ testScorer(Scorer, double, double)[5]
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest ‑ testScorer(Scorer, double, double)[6]
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest ‑ testScorer(Scorer, double, double)[7]
redis.clients.jedis.ClusterPipeliningTest ‑ sharedExecutorConcurrentPipelinesNoDeadlock
redis.clients.jedis.ClusterPipeliningTest ‑ sharedExecutorPipelineDoesNotShutdownSharedExecutor
redis.clients.jedis.ClusterPipeliningTest ‑ sharedExecutorPipelineKeysAtSameNode
redis.clients.jedis.commands.unified.search.FTHybridCommandsTestBase$SupportedScorersTest ‑ testScorer(Scorer, double, double)
This pull request skips 656 tests.
redis.clients.jedis.commands.commandobjects.CommandObjectsStringCommandsTest[1] ‑ testMsetexNx_parametrized(String, MSetExParams)[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsStringCommandsTest[1] ‑ testMsetexNx_parametrized(String, MSetExParams)[2]
redis.clients.jedis.commands.commandobjects.CommandObjectsStringCommandsTest[1] ‑ testMsetexNx_parametrized(String, MSetExParams)[3]
redis.clients.jedis.commands.commandobjects.CommandObjectsStringCommandsTest[1] ‑ testMsetexNx_parametrized(String, MSetExParams)[4]
redis.clients.jedis.commands.commandobjects.CommandObjectsStringCommandsTest[1] ‑ testMsetexNx_parametrized(String, MSetExParams)[5]
redis.clients.jedis.commands.commandobjects.CommandObjectsStringCommandsTest[2] ‑ testMsetexNx_parametrized(String, MSetExParams)[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsStringCommandsTest[2] ‑ testMsetexNx_parametrized(String, MSetExParams)[2]
redis.clients.jedis.commands.commandobjects.CommandObjectsStringCommandsTest[2] ‑ testMsetexNx_parametrized(String, MSetExParams)[3]
redis.clients.jedis.commands.commandobjects.CommandObjectsStringCommandsTest[2] ‑ testMsetexNx_parametrized(String, MSetExParams)[4]
redis.clients.jedis.commands.commandobjects.CommandObjectsStringCommandsTest[2] ‑ testMsetexNx_parametrized(String, MSetExParams)[5]
…

♻️ This comment has been updated with latest results.

@ggivo ggivo requested a review from atakavci April 2, 2026 10:35
@ggivo ggivo merged commit b0ccb8b into 7.4.x Apr 2, 2026
29 of 34 checks passed
@ggivo ggivo deleted the topic/ggivo/backport-7.4.x-4479-cluster-pipeline-external-executor branch April 2, 2026 10:58
@ggivo ggivo changed the title backport: [ClusterPipeline] ExecutorService/thread is created and des… backport: [ClusterPipeline] ExecutorService/thread is created and destroyed too frequently in ClusterPipeline Apr 3, 2026
mergify Bot added a commit to ArcadeData/arcadedb that referenced this pull request Apr 6, 2026
Bumps [redis.clients:jedis](https://github.com/redis/jedis) from 7.4.0 to 7.4.1.
Release notes

*Sourced from [redis.clients:jedis's releases](https://github.com/redis/jedis/releases).*

> v7.4.1
> ------
>
> Jedis 7.4.1 (Patch Release)
>
> What's Changed
> --------------
>
> \*[ClusterPipeline] ExecutorService/thread is created and destroyed too frequently in ClusterPipeline by [`@​ggivo`](https://github.com/ggivo) in [redis/jedis#4480](https://redirect.github.com/redis/jedis/pull/4480)
>
> **Full Changelog**: <redis/jedis@v7.4.0...v7.4.1>


Commits

* [`ec7e3eb`](redis/jedis@ec7e3eb) bump snapshot version to 7.4.1-SNAPSHOT ([#4481](https://redirect.github.com/redis/jedis/issues/4481))
* [`b0ccb8b`](redis/jedis@b0ccb8b) backport: [ClusterPipeline] ExecutorService/thread is created and des… ([#4480](https://redirect.github.com/redis/jedis/issues/4480))
* See full diff in [compare view](redis/jedis@v7.4.0...v7.4.1)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=redis.clients:jedis&package-manager=maven&previous-version=7.4.0&new-version=7.4.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants