jedis icon indicating copy to clipboard operation
jedis copied to clipboard

add crc32hash and compatible with RedisShardAPI

Open SeaSand1024 opened this issue 2 years ago • 3 comments

When we use RedisShardAPI in python with crc32hash, we can't compatible with Jedis,In addition, we will also add sharding algorithms,because it is different from python.

SeaSand1024 avatar Mar 07 '22 13:03 SeaSand1024

@SeaSand1024 Have you checked if this implementation is actually compatible with RedisShardAPI?

sazzad16 avatar Mar 07 '22 14:03 sazzad16

Codecov Report

Merging #2936 (9601493) into master (b5e0787) will decrease coverage by 0.01%. The diff coverage is 50.00%.

@@             Coverage Diff              @@
##             master    #2936      +/-   ##
============================================
- Coverage     53.69%   53.67%   -0.02%     
- Complexity     3336     3343       +7     
============================================
  Files           217      218       +1     
  Lines         13294    13330      +36     
  Branches        775      781       +6     
============================================
+ Hits           7138     7155      +17     
- Misses         5909     5927      +18     
- Partials        247      248       +1     
Impacted Files Coverage Δ
src/main/java/redis/clients/jedis/HostAndPort.java 68.00% <28.57%> (-20.89%) :arrow_down:
...nts/jedis/providers/ShardedConnectionProvider.java 69.13% <41.66%> (-6.93%) :arrow_down:
.../main/java/redis/clients/jedis/util/CRC32Hash.java 61.11% <61.11%> (ø)
...rc/main/java/redis/clients/jedis/util/Hashing.java 86.66% <100.00%> (+0.95%) :arrow_up:
...in/java/redis/clients/jedis/ConnectionFactory.java 63.26% <0.00%> (-4.09%) :arrow_down:
src/main/java/redis/clients/jedis/Jedis.java 84.92% <0.00%> (+0.04%) :arrow_up:
src/main/java/redis/clients/jedis/Connection.java 85.35% <0.00%> (+1.51%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b5e0787...9601493. Read the comment docs.

codecov-commenter avatar Mar 10 '22 09:03 codecov-commenter

@SeaSand1024 Have you checked if this implementation is actually compatible with RedisShardAPI?

Yes, I did. You'd better specify the format of HostAndPort the same as python if you use ShardedConnectionProvider.The default format is "host:port".

SeaSand1024 avatar Mar 12 '22 05:03 SeaSand1024

Sharding feature will be removed.

sazzad16 avatar May 19 '23 15:05 sazzad16