Bug 745826 (EDG-46)

Summary: memcached server should reply with CLIENT_ERROR to negative item size on set/add
Product: [JBoss] JBoss Data Grid 5 Reporter: Michal Linhard <mlinhard>
Component: InfinispanAssignee: Default User <jbpapp-maint>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: nobody
Target Milestone: ---   
Target Release: EAP 5.1.0 EDG TP   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/EDG-46
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-26 12:04:32 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-17 17:13:49 UTC
project_key: EDG

we should respond with CLIENT_ERROR on negative item sizes in set/add operations.

our server:
$ echo -e "set issue70 0 0 -1\r" | nc localhost 11211
SERVER_ERROR org.infinispan.server.core.ServerException: java.lang.NegativeArraySizeException

original memcached implementation:
$ echo -e "set issue70 0 0 -1\r" | nc localhost 11212
CLIENT_ERROR bad command line format

Comment 1 Michal Linhard 2010-11-17 17:31:00 UTC
this is kinda related:
the upper limit on item size is now given by max Integer size: 2147483647, because we parse the number as Integer.
when I try to allocate space for an item 2147483648 bytes big, it says
SERVER_ERROR org.infinispan.server.core.ServerException: java.lang.NumberFormatException: For input string: "2147483648"

which is kinda user unfriendly...


Comment 2 Galder ZamarreƱo 2010-11-18 10:31:49 UTC
Link: Added: This issue depends ISPN-784


Comment 3 Galder ZamarreƱo 2010-11-18 10:31:49 UTC
Link: Added: This issue depends ISPN-785