spring-projects / spring-projects/spring-boot
Provide more configuration properties for Jedis's connection pool
Nobody has claimed this yet.
- 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#jedisPoolConfigorg.springframework.boot.autoconfigure.data.redis.RedisProperties.Pool
I expect to be able to inject the following configuration automatically
org.apache.commons.pool2.impl.BaseObjectPoolConfig#durationBetweenEvictionRunsorg.apache.commons.pool2.impl.BaseObjectPoolConfig#minEvictableIdleDurationorg.apache.commons.pool2.impl.BaseObjectPoolConfig#numTestsPerEvictionRunorg.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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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