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

New UI displays counter document with 0 value as "empty"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 6.5.1
    • 5.5.0, 6.0.0, 6.5.0
    • UI
    • None
    • Untriaged
    • Unknown

    Description

      It looks like the new UI treats a counter document with a value 0 as empty.

      See

      In the old ui (I checked on 5.5) it looks fine displayed as 0:

      Code to reproduce:

          System.err.println(collection.binary().increment(UUID.randomUUID().toString(), IncrementOptions.incrementOptions().initial(0)));
          System.err.println(collection.binary().increment(UUID.randomUUID().toString(), IncrementOptions.incrementOptions().initial(1)));
      

      KV engine accepts both fine:

      CounterResult{cas=0x15eea32b64bb0000, mutationToken=Optional[mt{vbID=177, vbUUID=68327101389634, seqno=1, bucket=meta}], content=0}
      CounterResult{cas=0x15eea32b65000000, mutationToken=Optional[mt{vbID=848, vbUUID=158240136640219, seqno=1, bucket=meta}], content=1}
      

      Also a quick crosscheck from cbc shows the 0 is not empty but has a size:

      cbc cat -u Administrator -P password -U couchbase://10.143.186.101/meta 81dcf4f3-984c-4b96-a51a-0b61140255fc
      81dcf4f3-984c-4b96-a51a-0b61140255fc CAS=0x15eea32b64bb0000, Flags=0x0, Size=1, Datatype=0x00
      0
      

      Attachments

        Issue Links

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

          Activity

            People

              eben Eben Haber
              daschl Michael Nitschinger
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty