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

tools - recovery of 2.0 couchstore files corrupts item flags

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 2.0
    • 2.0-beta-2
    • tools
    • Security Level: Public
    • None

    Description

      Based on the learnings from MB-7229, the "data recovery" use case also has a bug. cbtransfer will recover corrupted item flags from couchstore files, as flags are actually stored in network-byte-order in couchstore files.

      (other item fields (like expiration?) should also be checked and fixed for endian-ness corruption while we're at it.)

      For example...

      I set an item of key "a", flag 100001, value "hello" into Couchbase 2.0.0. Then, try to recover it via cbtransfer's support of direct couchstore file access. You can see the flag 100001 is corrupted (network byte order conversion bug)...

      root@ubuntu1104-64:~# /opt/couchbase/bin/cbtransfer couchstore-files:///opt/couchbase/var/lib/couchbase/data stdout:
      set a 2709913856 0 5
      hello
      .
      bucket: default, msgs transferred...
      : total | last | per sec
      batch : 1 | 1 | 8.3
      byte : 5 | 5 | 41.4
      msg : 1 | 1 | 8.3
      2012-11-21 10:02:24,892: mt warning: cannot save bucket design on a stdout destination
      done

      Attachments

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

        Activity

          People

            bcui Bin Cui (Inactive)
            steve Steve Yen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty