Comments (9)
I feared, this would happen sooner or later.
from lettuce-core.
My solution for this was to execute the subscription in a thread. It can be pushed on the Netty loop too I guess.
from lettuce-core.
I'm wondering whether it is a good idea to introduce a ConnectionOptions class for enabling/disabling reconnects and perhaps how reconnect errors should be handled. This does not solve the problem above but would give a more fine grained control to the user.
from lettuce-core.
That will be a good place to add that "ping before thinking the connection is alive" I asked for before. This way the SSL tunnel can be verified before being used.
from lettuce-core.
+1
from lettuce-core.
I think, removing synchronized
from the dispatch()
methods should solve the deadlock. The writeLock
protects the reconnect sequence from other, interfering commands. Clients invoking commands while channelActive
will simply wait until activated()
is done.
from lettuce-core.
I think there is more reason for this synchronized
. Another method using it is close()
and we probably don't want anything writing while that is happening.
from lettuce-core.
synchronized
on close()
is important for that case. close()
should be called rarely in comparison to other methods. The only race which could occur is when using MULTI
and concurrent threads try to add commands to the MULTI
. This is in any case a bad idea - with or without synchronized
.
I took a look in the older version code. There was no inner lock and the method level synchronized
on dispatch()
was intended to prevent races. In certain constellations the commands received responses from earlier commands, therefore the inner lock came into place.
from lettuce-core.
Fixed with #59
from lettuce-core.
Related Issues (20)
- Release Lettuce 7.0.0.RELEASE
- Thread blocked when using one global instance of ClientResources but repeatedly opening and closing connections HOT 1
- Prepare 6.4.0 branch
- Application got io.lettuce.core.RedisCommandTimeoutException irregularly. HOT 3
- Does Lettuce use CLUSTER NODES instead of CLUSTER SLOTS to discover topology? HOT 3
- Caused by: io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required. HOT 3
- BugReport: ClusterTopologyRefreshTask is not shutdown when RedisClusterClient is shutdown
- Deadlock in SharedLock HOT 3
- `SCAN` not working when using a read-only user HOT 4
- Periodic cluster topology refresh blocks commands execution. HOT 5
- Provide a way to force the driver to reconnect HOT 1
- io.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1 HOT 4
- What are the differences and relationships between TimeoutOptions and defaultTimeout of AbstractRedisClient?
- Lettuce Drivers Fail on RedisHandshake when connecting to GCP Redis 7.2 HOT 1
- How to reduce memory footprint of RedisClient HOT 1
- Add support to get remaining TTL
- Flaky tests on the CI pipeline
- Improvements to the Redis connection/codec layer
- Distributed Lock with Lettuce HOT 1
- Cursor based operations not working properly with ReadFrom = ANY HOT 2
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 lettuce-core.