Bug 745828 (EDG-56) - stats command processing doesn't allow command arguments
Summary: stats command processing doesn't allow command arguments
Keywords:
Status: CLOSED NEXTRELEASE
Alias: EDG-56
Product: JBoss Data Grid 5
Classification: JBoss
Component: Infinispan
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: EAP 5.1.0 EDG TP
Assignee: Default User
QA Contact:
URL: http://jira.jboss.org/jira/browse/EDG-56
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-19 14:32 UTC by Michal Linhard
Modified: 2014-03-17 04:01 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-26 12:05:46 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker EDG-56 0 None None None Never

Description Michal Linhard 2010-11-19 14:32:57 UTC
project_key: EDG

in memcached server module, stats command is processed in a way that it isn't read as a whole line

after the input "stats" is read we're not reading the input till the end of the line but treating the next input as next command:

eg input "stats delete a\r" results to output:
STAT pid 0
....
STAT conn_yields 0
END
NOT_FOUND

input "stats bla\r" leads to
STAT pid 0
....
STAT conn_yields 0
END
SERVER_ERROR org.infinispan.server.core.UnknownOperationException: Unknown operation: bla

regarding stats we should be prepared for this kind of input:
"stats\r\n"
"stats <args>\r\n"

ie client might pass some additional arguments after stats command, which are not to be interpreted as next command.
(we need to read the whole line to the end.)

Comment 1 Galder Zamarreño 2010-11-22 11:31:39 UTC
Even though it's not documented (I should do so) stats <args> is basically not implemented due to the following notes in the protocol:

"stats <args>\r\n

Depending on <args>, various internal data is sent by the server. The
kinds of arguments and the data sent are not documented in this vesion
of the protocol, and are subject to change for the convenience of
memcache developers."

Basically, args is internal and hence not documented. So the only format supported should be: stats\r\n

So, I'd suggest closing this JIRA and I'll update the docu accordingly. Ok?

Comment 2 Michal Linhard 2010-11-22 13:34:35 UTC
I see why we don't support stats args.
my point is that we should read the whole input "stats <args>\r\n" anyway
and report something like 
"SERVER_ERROR arguments in stats command are not supported\r\n"

depending on the argument there will be probably some further erroneous input, but I think we should handle the input in "line mode".

Comment 3 Galder Zamarreño 2010-11-24 12:39:19 UTC
Fair point, I'll add a JIRA for that and to update the docu accordingly.

Comment 4 Galder Zamarreño 2010-11-24 12:45:43 UTC
Link: Added: This issue depends ISPN-793



Note You need to log in before you can comment on or make changes to this bug.