Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-55225

Incorrect response format for key_only=false range scan

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Elixir
    • Elixir
    • couchbase-bucket
    • None
    • Untriaged
    • 0
    • Unknown

    Description

      Simple single document in the bucket:

      $ cbc cat -u Administrator -P password key
      key                  CAS=0x173cf1b9a9240000, Flags=0x0, Size=27, Datatype=0x01(JSON)
      {"field":"this is a value"}

      Wireshark shows:

      HELLO request:

      169 11.270334652    127.0.0.1   127.0.0.1   Couchbase   113 Hello Request, Opcode: 0x1f, VBucket: 0x0

      0000   00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
      0010   00 63 fe 15 40 00 40 06 3e 7d 7f 00 00 01 7f 00   .c..@.@.>}......
      0020   00 01 bd 9a 2b ca 71 96 40 a6 f8 77 d6 1a 80 18   ....+.q.@..w....
      0030   02 00 fe 57 00 00 01 01 08 0a 87 ec 22 cc 87 ec   ...W........"...
      0040   22 cc 80 1f 00 0b 00 00 00 00 00 00 00 17 00 00   "...............
      0050   00 00 00 00 00 00 00 00 00 00 47 6f 4d 65 6d 63   ..........GoMemc
      0060   61 63 68 65 64 00 0b 00 06 00 11 00 12 00 14 00   ached...........
      0070   07        

                                              .

      Corresponding memcached.log entry:

      2023-01-23T14:00:56.949305+00:00 INFO 87: HELO [GoMemcached] XATTR, XERROR, JSON, SyncReplication, Collections, PreserveTtl [ {"ip":"127.0.0.1","port":48538} - {"ip":"127.0.0.1","port":11210} (not authenticated) ]
      2023-01-23T14:00:56.978128+00:00 INFO 87: Client {"ip":"127.0.0.1","port":48538} authenticated as <ud>@cbq-engine</ud>

      And the range scan response packet:

      837 11.368772319    127.0.0.1   127.0.0.1   Couchbase   153 Unknown opcode (0xdb) Response, Opcode: 0xdb, Unknown status: 0xa7

      0000   00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
      0010   00 8b e3 86 40 00 40 06 58 e4 7f 00 00 01 7f 00   ....@.@.X.......
      0020   00 01 2b ca bd 9a f8 78 3c 61 71 96 97 e3 80 18   ..+....x<aq.....
      0030   02 00 fe 7f 00 00 01 01 08 0a 87 ec 23 2e 87 ec   ............#...
      0040   23 2e 81 db 00 00 04 00 00 a7 00 00 00 3f 00 00   #............?..
      0050   00 f5 00 00 00 00 00 00 00 00 00 00 00 01 00 00   ................
      0060   00 00 00 00 00 00 00 00 00 00 00 00 00 01 17 3c   ...............<
      0070   f1 b9 a9 24 00 00 03 03 6b 65 79 1d 1b 68 7b 22   ...$....key..h{"
      0080   66 69 65 6c 64 22 3a 22 74 68 69 73 20 69 73 20   field":"this is 
      0090   61 20 76 61 6c 75 65 22 7d                        a value"}

      The issue is the length field for the document body appears to be bracked by 0x1d & 0x68 (key and metadata fields are fine).

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Donald.haggart Donald Haggart
              Donald.haggart Donald Haggart
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty