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.
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.
Have a simple test case that reproduces this on standalone and cluster.
a80dfdd
from lettuce.
Hi @taer I'll take a look on this.
from lettuce.
@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.
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.
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.
There is a Cluster setup rule (JUnit Test Rule) (see existing cluster tests) which might help you
from lettuce.
Can I close this issue after #43 is merged?
from lettuce.
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.
Closing, everything is fine. Thanks @taer
from lettuce.
Related Issues (20)
- Connection handshake fails with `ERR unknown command CLIENT, with args beginning with: SETINFO lib-name` HOT 4
- Kotlin ExperimentalLettuceCoroutinesApi annotation on sync multi DSL block is necessary? HOT 2
- Support publishing of long-lived JFR events to the `EventBus`
- Redis health check failed ConcurrentModificationException: null HOT 1
- Make WithLatency visable for better custmization HOT 2
- Tracing is enabled even when using DefaultClientResources
- Add option to customize expected exceptions in `DefaultEndpoint` HOT 1
- nested exception is java.lang.UnsupportedOperationException: io.lettuce.core.output.ValueOutput does not support set(long) HOT 2
- georaduis command execute error when use ReadFrom.REPLICA_PREFERRED HOT 9
- Hash Field Expiration Support
- SSL FULL verify seed connection, but only CA verify for cluster node connections
- Getting the keys from cache returns the wrong amount in cluster mode with replica enabled. HOT 1
- 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
- After turning on topology refresh, lettuce log is written inside rocketmq-client.log. HOT 3
- Lettuce client reconnecting frequently HOT 1
- Custom command with Lettuce occurs UnsupportedOperationException HOT 1
- Stateful redis cluster pubsub is not working HOT 1
- Why does lecttuce send lua script load command to all nodes (including replicas) in redis cluster? HOT 2
- `DefaultClientResources.dnsResolver(DnsResolver resolver)` should be marked as deprecated.
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.