| Summary: | malformed memcached cas command should result in CLIENT_ERROR | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Data Grid 5 | Reporter: | Michal Linhard <mlinhard> |
| Component: | Infinispan | Assignee: | Default User <jbpapp-maint> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | EAP 5.1.0 EDG TP | CC: | nobody |
| Target Milestone: | --- | ||
| Target Release: | EAP 5.1.0 EDG TP | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://jira.jboss.org/jira/browse/EDG-49 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-11-17 17:33:33 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Michal Linhard
2010-11-15 15:27:43 UTC
and one more related thing: missing cas value should result in CLIENT_ERROR instead SERVER_ERROR: [mlinhard@michal-linhard ~]$ echo -e "cas foo 0 0 6 \r\nbarva2\r\n" | nc localhost 11211 SERVER_ERROR org.infinispan.server.core.ServerException: java.lang.ArrayIndexOutOfBoundsException: 3 but in this case I'm a bit uncertain because original memcached server replies ERROR here. to me this seems like a bug on their side, because the mentioned input "cas foo 0 0 6 \r\nbarva2\r\n" is not an unknown command (=ERROR) but " error in the input line, i.e. the input doesn't conform to the protocol in some way" (=CLIENT_ERROR) Thanks Michal. Wrt your last comment, one thing is for sure, it shouldn't throw an ArrayIndexOutOfBoundsException, so I'll go with a CLIENT_ERROR for that. Actually, I know why it sends an ERROR saying unknown command. That's cos after \r\n, a new command starts, and hence barva2 is not a known command. The server is right on this. Not sure actually. I'll double check what the server does with "cas foo 0 0 6 \r\nbarva2\r\n" to be more precise and get back to you. Link: Added: This issue depends ISPN-773 It seems like Memcached server is just sending you the last of the errors, which indeed is an unknown command, but this is just a side effect of the first error, which is the lack of the cas id. I'm gonna go with CLIENT_ERROR cos, as you rightly pointed out, that's the real issue here. Yes, there's one ERROR for the "barva2\r\n" input as well, but it says error also to the first line (the original memcached implementation): $ echo -e "cas foo 0 0 6 \r\nbarva2\r" | nc localhost 11212 ERROR ERROR $ echo -e "cas foo 0 0 6 \r" | nc localhost 11212 ERROR Oh right, it mentions both. I've coded it to show the first which is the key one as CLIENT_ERROR. I don't think we should get too hang up on this though. |