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

couch_dbdump incorrectly outputs escape sequences that include '\x'

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 7.1.0
    • 7.1.0
    • couchbase-bucket
    • None
    • Untriaged
    • 1
    • Unknown
    • KV 2021-Dec

    Description

      What is the issue?
      Currently, couch_dbdump doesn't handle the escape sequences that include '\x' correctly and instead it outputs "
      u00ffffff" (unidentified character), which breaks many UTF-8 symbols. I am almost certain that '
      u00fffffff' is always outputted for '\x' since, at least for the travel-sample bucket, substituting all its occurrences for '\x' makes the contents of all documents in the couch_dbdump output match the contents of all corresponding documents in the cbriftdump output for a full backup of the same data.

      Example:
      Instead of outputting

      \xe2\x80\x93
      

      escape sequence, which stands for "en dash" symbol, couch_dbdump outputs

      \\u00ffffffe2\\u00ffffff80\\u00ffffff93
      

       
      Steps to reproduce:

      1. Set up and configure a cluster with one data node
      2. Import the travel-sample sample bucket using web UI
      3. Run something like

        couch_dbdump --json ~/cb/source/ns_server/data/n_0/data/travel-sample/*.couch.1 | grep "\\u00ffffff"
        

        to get all of the documents that contain '
        u00ffffff'.

      Attachments

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

        Activity

          People

            maks.januska Maksimiljans Januska
            maks.januska Maksimiljans Januska
            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