spring-projects / spring-projects/spring-boot

Provide more configuration properties for Jedis's connection pool

Open
#33,814 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

status: pending-design-work type: enhancement
Dominant language
Java
Stars
81.5k
Forks
42.7k
Avg merge
2d 4h
Merged PRs (30d)
65

Description

spring-boot version: 2.7.7

When the timeout period is set on the redis server, the client needs to perform connection timeout detection in time. However, the configuration provided in the current spring-boot-autoconfigure is incomplete:

  • org.springframework.boot.autoconfigure.data.redis.JedisConnectionConfiguration#jedisPoolConfig
  • org.springframework.boot.autoconfigure.data.redis.RedisProperties.Pool

I expect to be able to inject the following configuration automatically

  • org.apache.commons.pool2.impl.BaseObjectPoolConfig#durationBetweenEvictionRuns
  • org.apache.commons.pool2.impl.BaseObjectPoolConfig#minEvictableIdleDuration
  • org.apache.commons.pool2.impl.BaseObjectPoolConfig#numTestsPerEvictionRun
  • org.apache.commons.pool2.impl.BaseObjectPoolConfig#testOnBorrow

In addition to durationBetweenEvictionRuns, three other key configuration does not support automatic injection.
Now that you can inject durationBetweenEvictionRuns automatically, then the other three configuration is also should be automatic injection

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with org.springframework.boot.autoconfigure.data.redis.RedisProperties.Pool and JedisConnectionConfiguration#jedisPoolConfig, then compare how durationBetweenEvictionRuns is currently injected. Done means the pool exposes automatic configuration for minEvictableIdleDuration, numTestsPerEvictionRun, and testOnBorrow as well, alongside durationBetweenEvictionRuns.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, redis, spring-boot
Domain
backend, databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.