Bug 745819 (EDG-98)

Summary: max key length in memcached server module is not limited
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-98
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-22 10:31:55 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-10-28 10:53:53 UTC
project_key: EDG

max key length in memcached server module is not limited by some explicit value.

Of course this is not memcached compatibility issue, just want to clear things out:

A. we want to keep the arbitrary length ?
then I'm probably writing a test case with 5gig key, just for fun :-)

B. we want to limit the length
then let's use the limit from the protocol:
"Currently the length limit of a key is set at 250 characters (of course, normally clients wouldn't need to use such long keys)"
(http://github.com/memcached/memcached/blob/master/doc/protocol.txt)

by characters I guess they mean bytes...

Comment 1 Galder Zamarreño 2010-10-29 09:12:47 UTC
I think it's right that we limit the key size as per the protocol. Michal, out of curiosity, did you check what happens if you send keys longer than 250 characters to the standard memcached implementation? Does it through an error or truncate it?

Comment 2 Michal Linhard 2010-10-29 09:26:12 UTC
IIRC it just works as if it was a normal key. No errors in that concern as far as I remember. (the truncating I didn't check though)

Comment 3 Michal Linhard 2010-10-29 09:27:06 UTC
I mean I tried length 251, no extreme cases yet :-)

Comment 4 Michal Linhard 2010-10-29 09:31:23 UTC
Oh sorry, you ment standard memcached implementation...

it responds with CLIENT_ERROR

Comment 5 Galder Zamarreño 2010-10-29 10:44:51 UTC
Right, so if the standard memcached throws an ERROR, we should be doing the same

Comment 6 Galder Zamarreño 2010-10-29 10:48:30 UTC
Link: Added: This issue depends ISPN-746


Comment 7 Galder Zamarreño 2010-11-04 10:54:21 UTC
Upgrade to 4.2.0.BETA1 when is out to have the fix.

Comment 8 Michal Linhard 2010-11-17 16:52:05 UTC
tried with infinispan 4.2.0.BETA1 and the limitation still doesn't work with commands get and gets (the case is not handled in the method MemcachedDecoder.readKeys)

Comment 9 Galder Zamarreño 2010-11-18 10:04:13 UTC
Link: Added: This issue depends ISPN-780


Comment 10 Anne-Louise Tangring 2011-10-11 17:06:19 UTC
Release Notes Docs Status: Removed: Not Required