Comments (5)
Hi kryton,
The client, as I hope has been sufficiently noted, is not thread safe. n threads requires n clients. Are you using a single instance of JRedisClient for all of the threads?
from jredis.
sadly no.
this is how I call it.
public void run() {
JRedis redis = new JRedisClient(this.redisHost, Integer.decode(this.redisPort));
...
}
from jredis.
Alright. In JRedisSupport.java, change:
public static final boolean CacheKeys = true;
to
public static final boolean CacheKeys = false;
and let me know if the issue is resolved.
from jredis.
looks like that did the trick.
you might want to change the HashMap to ConcurrentHashMap (http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ConcurrentHashMap.html )
from jredis.
Yep. It was a speed hack to begin with and slipped in to the release. Not sure if everyone would want to pay the memory (and concurrency) cost as it doesn't buy anything for apps that don't have a finite set of keys.
from jredis.
Related Issues (20)
- Expecting status code for size/count HOT 1
- Infinitive loop on reconnect (disconnect errors) HOT 3
- Connection re-established but last request not processed HOT 1
- java.util.concurrent.ExecutionException: Provider ExceptionBug? Expecting status code for size/count HOT 5
- add support for pub/sub
- full binary support HOT 11
- add support for hashes HOT 2
- add support for 2.2 (new unified request protocol) HOT 1
- invalid pom.xml configuration HOT 2
- pooling support & logging
- missing redis operations
- Build Failure HOT 2
- jreids ZINTERSTORE , ZUNIONSTORE wrong result HOT 2
- Occasional exception: org.jredis.connector.ConnectionReset: Connection re-established but last request not processed: in.read returned -1 HOT 10
- JRedis: specifying encoding for String opterations HOT 1
- can't call "sadd" sequentially HOT 1
- JRedisClient-tests error HOT 2
- Runtime Exception HOT 1
- ERR Protocol error: expected '$' got '*' on mset HOT 2
- Add support for time command
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jredis.