Giter VIP home page Giter VIP logo

jedis's Introduction

tirumudi

Personal Web page for Tirumudi (tats me !!!!)

jedis's People

Stargazers

 avatar

Watchers

 avatar

jedis's Issues

Ignoring entries with score 0 when using Double.MIN_VALUE and Double.MAX_VALUE for -inf,+inf in zrangeByScore[withScores]

127.0.0.1:6379> zrangebyscore test -inf +inf withscores
1) "foo"
2) "0"
3) "hello"
4) "1"
5) "world"
6) "2"


public class TestRedis {

    @Test
    public void test() throws Exception {
        Jedis jedis = new Jedis("localhost", 6379) ;
        Set<Tuple> tuples = jedis.zrangeByScoreWithScores("test", Double.MIN_VALUE, Double.MAX_VALUE) ;

        System.out.println(tuples.size()) ;

        jedis.close() ;


    }

The number 2 is printed.

What is the expected output? What do you see instead?

I expect to see 3 results.  The "0 foo" is not included in the results.

What version of the product are you using? On what operating system?

2.5.1 linux.

Please provide any additional information below.

I started debugging this in Java, and I don't think it's a Jedis issue -- it 
seems like the actual input stream from the server does not include it.  If I 
run the same query with normal values (i.e. -10, 10) all 3 come back.  The 
redis server may be getting confused by the large negative or positive number.  
Not a redis expert, but dumping those values to byte array and sending them 
across the wire seems like asking for trouble for large values.  Perhaps 
detecting Double.MIN_VALUE and Double.MAX_VALUE and replacing them with 
'-inf','+'inf' instead?


Original issue reported on code.google.com by [email protected] on 21 Jul 2014 at 11:14

FixedResourcePool failed

I'm using jedis version on your git repository, and i have some problem with 
its ConnectionPool, I think RepairThread should catch exception that throw by 
createResource. I make a test like this:

1. new JedisPool() <--> RedisServer did not started
2. getResource()   <--> RedisServer still down.
3. getResource()   <--> RedisServer up.
4. getResource()   <--> RedisServer down.
5. getResource()   <--> RedisServer up.

in summary, a loop try to get connection to RedisServer, put an item, server 
side will up/down redis-server for several times, and I hope JedisPool will 
wait for connection available. in my test, JedisPool turn frozen after some 
restart of redis-server.

Original issue reported on code.google.com by [email protected] on 3 Sep 2010 at 3:16

Jedis.close() should return Jedis to pool instead of closing it

What steps will reproduce the problem?
1. try (Jedis jedis = pool.getResource()) {}

What is the expected output? What do you see instead?

Jedis was accessed from a pool. Jedis should be returned to the pool. Instead 
the connection is closed.
This makes it impossible to use Jedis in a try-with-resource.
Also, findbugs complains if close isn't called on Jedis, as it is a Closable.

What version of the product are you using? On what operating system?

2.4.0
OS: irrelevant

Please provide any additional information below.

I think it's stylistically terse to use Jedis with a try-with-resource. This 
behavior would be similar to JDBC DataSource connection pooling, and I am 
assuming, easy enough to implement.

Original issue reported on code.google.com by [email protected] on 21 Feb 2014 at 9:46

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.