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