Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-781

Memcached pipelined delete messages wrongly processed

XMLWordPrintable

    • Low

      The code incorrectly detects the optional, unsupported, noreply parameter.

      From Michal:

      "The text protocol processing logic regarding delete command doesn't allow for command pipelining:

      $ echo -e "delete a\r\ndelete a\r" | nc localhost 11211
      CLIENT_ERROR org.infinispan.server.core.ServerException: java.io.StreamCorruptedException: Unable to parse noreply optional argument

      the logic is as follows

      1. read header "delete "
      2. read key "a\r\n"
      3. read parameters READS ERRONEOUSLY NEXT COMMAND: "delete a\r\n"

      when sending one command only this is ok
      $ echo -e "delete a\r" | nc localhost 11211
      NOT_FOUND

      because read parameters in step 3 just returns line ""
      but makes trouble when delete command appears in the middle of the command input stream."

              rh-ee-galder Galder ZamarreƱo
              rh-ee-galder Galder ZamarreƱo
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: