Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JedisConnection always executes SELECT via RedisTemplate [DATAREDIS-714] #1289

Closed
spring-projects-issues opened this issue Oct 9, 2017 · 6 comments
Assignees
Labels
in: jedis type: enhancement

Comments

@spring-projects-issues
Copy link

spring-projects-issues commented Oct 9, 2017

abccbaandy opened DATAREDIS-714 and commented

properties :

spring.redis.database=3

code :

HashOperations<String, String, String> hashOperations = redisTemplate.opsForHash();
Map<String, String> map = hashOperations.entries("2330");

redis monitor :

"SELECT" "3"
"HGETALL" "1234"
"SELECT" "0"

it should be only this, isn't it?

"HGETALL" "1234"

I submit this issue to spring boot few days before, but maybe here is better place to submit this issue?
spring-projects/spring-boot#10540


Affects: 1.8.7 (Ingalls SR7)

Issue Links:

  • DATAREDIS-244 Select db index maybe cause resource wasted when user only use one db index larger than 0

  • DATAREDIS-10 JedisConnection may fail to select database

  • DATAREDIS-790 Backport JedisConnection always executes SELECT via RedisTemplate

Referenced from: pull request #291

Backported to: 2.0.3 (Kay SR3)

@spring-projects-issues
Copy link
Author

spring-projects-issues commented Oct 10, 2017

Mark Paluch commented

Please do not cross-post. In any case, this is the appropriate issue tracker for Spring Data Redis

@spring-projects-issues
Copy link
Author

spring-projects-issues commented Nov 2, 2017

Mark Paluch commented

It seems the code originates from a Jedis version where database selection and pooling did not reliably work. I think we can simplify things here

@spring-projects-issues
Copy link
Author

spring-projects-issues commented Nov 2, 2017

Mark Paluch commented

It would make sense to back-port this improvement to Ingalls and Kay. WDYT?

@spring-projects-issues
Copy link
Author

spring-projects-issues commented Mar 15, 2018

kyleyu commented

This feature is on spring-data-redis 2.0 now, can you merge it into elder versions like 1.8?
Because spring-data-redis 2.0 will bring in spring framework 5.0, and you know, upgrading framework is much harder than upgrading spring-data:P

@spring-projects-issues
Copy link
Author

spring-projects-issues commented Mar 15, 2018

Mark Paluch commented

kyleyu I filed DATAREDIS-790 to backport the change to the upcoming 1.8.11 release

@spring-projects-issues
Copy link
Author

spring-projects-issues commented Mar 15, 2018

kyleyu commented

@Mark Paluch
thank you for your patient replies(y)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: jedis type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants