Comments (11)
Ok, I see the problem now, but not sure how this happens. In CommandHandler:118
while (!queue.isEmpty() && rsm.decode(buffer, queue.peek(), queue.peek().getOutput())) {
The queue is NOT empty. On the next time through after I break the connection via the UTF8Decoder pause, it has 2 things in it.
Head of the queue is my original clustercommand
Command [type=HGETALL, output=null]
Next in queue is the one I just retried
Command [type=HGETALL, output=MapOutput [output={}, error='null']]
rsm.decode is getting a null output, but returning false, which is exiting the while loop, abandoning my command that I just sent in.
Inverting the return at RedisStateMachine:81 to
if (output == null) {
return !stack.isEmpty();
}
Sort of solves this problem(future commands work to that key). The old command is taken from the queue, completed, and loops over again, sending the result to my real command. But I haven't dug through RSM too much. I think the queue in CommandHandler should be removing the timed out Commands when they time out. Is that the intention of the above stack.isEmpty?
Also, with that small hack above, isMoved() in ClusterCommand NPEs due to otput being null. That could probably be checked for.
from lettuce-core.
e5fbd1e has a patch that makes it not freeze. However, like I said above, I have no idea if this breaks other things.
from lettuce-core.
Have a simple test case that reproduces this on standalone and cluster.
a80dfdd
from lettuce-core.
Hi @taer I'll take a look on this.
from lettuce-core.
@mp911de Think I found a solution(and updated the test as well) The inversion of that line in RSM is definitely incorrect.
I pushed a new version of BreakServer(should be called breakClient) bd5227f . The fix is 3e20467
from lettuce-core.
You're faster than me. Would you like to create a PR that contains the fix and the cluster setup (your test perhaps makefile-changes as well)?
from lettuce-core.
Sure. I'm updating the test now to fit with the rest of the integration tests. And am putting it someplace sane.
Since the command fix fixed both(standalone and cluster), and cluster setup in a test is much more prone to errors, I removed the cluster part.
from lettuce-core.
There is a Cluster setup rule (JUnit Test Rule) (see existing cluster tests) which might help you
from lettuce-core.
Can I close this issue after #43 is merged?
from lettuce-core.
It satisfies this case. I don't see if breaking anything else. I don't see it causing leaks, since if there is an output, the command will be taken from the queue in CommandHandler.java, GCing both.
from lettuce-core.
Closing, everything is fine. Thanks @taer
from lettuce-core.
Related Issues (20)
- Is client side caching enabled by default in lettuce? If yes, Is there a way to not do client side caching in lettuce? HOT 1
- Seeing Warning Logs :: Cannot refresh Redis Cluster topology in 6.2.6.RELEASE HOT 4
- After turning on topology refresh, lettuce log is written inside rocketmq-client.log. HOT 4
- Lettuce client reconnecting frequently HOT 1
- Custom command with Lettuce occurs UnsupportedOperationException HOT 1
- Stateful redis cluster pubsub is not working HOT 4
- Why does lecttuce send lua script load command to all nodes (including replicas) in redis cluster? HOT 4
- `DefaultClientResources.dnsResolver(DnsResolver resolver)` should be marked as deprecated.
- ClusterTopologyChangedEvent Timing Issue
- Provide a convenience method to support reading of last message from stream
- use with gateway,but something throw io.lettuce.core.output.ValueOutput does not support set(long) HOT 10
- Adjusting disconnectedBehavior Option to Prevent Timeout When Redis Shutdown HOT 4
- Pool exhausted, Java 21 and Virtual Threads HOT 3
- AWS RedisCache replica Failover can not be resolved HOT 1
- 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
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.