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

stats key returns a stat as non-key value in violation of the protocol

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.8.0, 2.0-developer-preview-4
    • Fix Version/s: None
    • Component/s: couchbase-bucket
    • Security Level: Public
    • Labels:
      None

      Description

      The protocol calls for all stats to be returned as a key and value pair. Accordingly, client libraries parse for key and value pairs.

      According to the new docs for stats key, one important stat returns only a value. This would make most client libraries fail to parse the response.

      See: https://github.com/couchbase/ep-engine/blob/master/docs/stats.org#29-stats-key-and-vkey

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

        Activity

        Hide
        ingenthr Matt Ingenthron added a comment -

        This may be a blocker for upcoming OBSERVE.

        Show
        ingenthr Matt Ingenthron added a comment - This may be a blocker for upcoming OBSERVE.
        Hide
        avsej Sergey Avseyev added a comment -

        Looks like just typo, here is output of cbc tool (from libcouchbase package):

        $ cbc cat x
        "x" Size 5 Flags 0x0 CAS 0x69cf70ff8de90000
        test
        $ curl -s http://localhost:8091/pools/default/buckets/default | vbuckettool - x
        key: x master: 127.0.0.1:11210 vBucketId: 220 couchApiBase: http://127.0.0.1:8092/default replicas:
        $ cbc stats "key x 220"
        127.0.0.1:11210 key_is_dirty 0
        127.0.0.1:11210 key_exptime 0
        127.0.0.1:11210 key_flags 0
        127.0.0.1:11210 key_cas 256796085243753
        127.0.0.1:11210 key_dirtied 0
        127.0.0.1:11210 key_data_age 0
        127.0.0.1:11210 key_last_modification_time 1338826758
        $ cbc stats "vkey x 220"
        127.0.0.1:11210 key_is_dirty 0
        127.0.0.1:11210 key_exptime 0
        127.0.0.1:11210 key_flags 0
        127.0.0.1:11210 key_cas 256796085243753
        127.0.0.1:11210 key_dirtied 0
        127.0.0.1:11210 key_data_age 0
        127.0.0.1:11210 key_last_modification_time 1338826854
        127.0.0.1:11210 key_valid valid

        Also here is the chunk of the code adding that stat
        https://github.com/couchbase/ep-engine/blob/d97ff8fb5aeb63fe827e8124a781cf73309fa7f1/ep_engine.cc#L3165-L3167

        Show
        avsej Sergey Avseyev added a comment - Looks like just typo, here is output of cbc tool (from libcouchbase package): $ cbc cat x "x" Size 5 Flags 0x0 CAS 0x69cf70ff8de90000 test $ curl -s http://localhost:8091/pools/default/buckets/default | vbuckettool - x key: x master: 127.0.0.1:11210 vBucketId: 220 couchApiBase: http://127.0.0.1:8092/default replicas: $ cbc stats "key x 220" 127.0.0.1:11210 key_is_dirty 0 127.0.0.1:11210 key_exptime 0 127.0.0.1:11210 key_flags 0 127.0.0.1:11210 key_cas 256796085243753 127.0.0.1:11210 key_dirtied 0 127.0.0.1:11210 key_data_age 0 127.0.0.1:11210 key_last_modification_time 1338826758 $ cbc stats "vkey x 220" 127.0.0.1:11210 key_is_dirty 0 127.0.0.1:11210 key_exptime 0 127.0.0.1:11210 key_flags 0 127.0.0.1:11210 key_cas 256796085243753 127.0.0.1:11210 key_dirtied 0 127.0.0.1:11210 key_data_age 0 127.0.0.1:11210 key_last_modification_time 1338826854 127.0.0.1:11210 key_valid valid Also here is the chunk of the code adding that stat https://github.com/couchbase/ep-engine/blob/d97ff8fb5aeb63fe827e8124a781cf73309fa7f1/ep_engine.cc#L3165-L3167
        Hide
        ingenthr Matt Ingenthron added a comment -

        I've reopened MB-5304, since it appears based on Sergey's note that the documentation recently added may be wrong.

        His output here also shows there's a difference between stats key and stats vkey, and that should be documented.

        Show
        ingenthr Matt Ingenthron added a comment - I've reopened MB-5304 , since it appears based on Sergey's note that the documentation recently added may be wrong. His output here also shows there's a difference between stats key and stats vkey, and that should be documented.

          People

          • Assignee:
            dipti Dipti Borkar
            Reporter:
            ingenthr Matt Ingenthron
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes