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

memcached server incr/decr doesn't work in unsigned 64bit integer mode

    XMLWordPrintable

Details

    Description

      [mlinhard@michal-linhard ~]$ telnet localhost 11211
      Trying 127.0.0.1...
      Connected to localhost.
      Escape character is '^]'.
      set a 0 0 19
      9223372036854775808
      STORED
      incr a 1
      SERVER_ERROR org.infinispan.server.core.ServerException: java.lang.NumberFormatException: For input string: "9223372036854775808"

      when I run original memcached server on port 11212 it works:
      [mlinhard@michal-linhard ~]$ telnet localhost 11212
      Trying 127.0.0.1...
      Connected to localhost.
      Escape character is '^]'.
      set a 0 0 1
      A
      STORED
      set a 0 0 19
      9223372036854775808
      STORED
      incr a 1
      9223372036854775809

      ----------------
      Other issue here is overflow:
      set a 0 0 19
      9223372036854775807
      incr a 1
      -9223372036854775808

      whereas original memcached server overflows in "unsigned mode":
      set b 0 0 20
      18446744073709551615
      incr b 1
      0

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: