Details
-
Bug
-
Resolution: Fixed
-
Minor
-
7.1.0
-
None
-
Triaged
-
1
-
Unknown
-
KV 2021-Dec
Description
What is the issue?
Currently, couch_dbdump outputs incorrect document IDs for several documents. Normally the format of the document ID in the output is (collection:0x[collection id in hex])[document key] or (collection:0x0:default)[document key] but for some documents it outputs [some escape sequence][document key].
For example, in the travel-sample dataset there are several documents with the following escape sequences as prefixes in their IDs:
\t, \r, \x0b, \x0f, and \x11
|
This happens with and without --json flag:
# Bad doc
|
Doc seq: 98 |
id: \t34
|
# Good
|
Doc seq: 97 |
id: (collection:0x0:default)route_7981 |
# Good
|
Doc seq: 96 |
id: (collection:0x14)route_6667 |
b'{"seq":98,"id":"\t34","rev":1,"content_meta":00,"physical_size":524,"cas":"1637953940280836096","expiry":0,"flags":0,"datatype":3,"datatype_as_text":["snappy","json"],"size":516,"body":"{\\n \\"name\\": \\"Tomas Haag\\",\\n \\"addresses\\": [\\n {\\n \\"type\\": \\"home\\",\\n \\"address\\": \\"94425 Feest Valleys\\",\\n \\"city\\": \\"San Jose\\",\\n \\"country\\": \\"United States\\"\\n }\\n ],\\n \\"driving_licence\\": \\"ed93ad8d-31cf-5945-a564-d5c628f0c8e8\\",\\n \\"passport\\": \\"f6a3d562-69a6-5937-8775-a7515a6be080\\",\\n \\"preferred_email\\": \\"tomashaag@jotki.lu\\",\\n \\"preferred_phone\\": \\"(429) 635-8856\\",\\n \\"preferred_airline\\": \\"inventory.airline.airline_225\\",\\n \\"preferred_airport\\": \\"inventory.airport.airport_3748\\",\\n \\"credit_cards\\": [\\n {\\n \\"type\\": \\"Visa\\",\\n \\"number\\": \\"4838291754780877\\",\\n \\"expiration\\": \\"2021-11\\"\\n },\\n {\\n \\"type\\": \\"Visa\\",\\n \\"number\\": \\"4812898467217177\\",\\n \\"expiration\\": \\"2021-08\\"\\n }\\n ],\\n \\"created\\": \\"2020-09-06\\",\\n \\"updated\\": \\"2021-02-19\\"\\n}"}' |
Steps to reproduce:
- Set up and configure a cluster with one data node
- Import the travel-sample sample bucket using web UI
- Run something like
couch_dbdump ~/source/ns_server/data/n_0/data/travel-sample/*.couch.1 | grep id: -w | grep -E "collection:0x|scope" -v
to get all of the invalid keys or
couch_dbdump --json ~/cb/source/ns_server/data/n_0/data/travel-sample/*.couch.1 | grep id -w | grep -E "collection:0x|scope" -v
to get all of the documents with invalid keys and their metadata in JSON format.
Attachments
Issue Links
- blocks
-
MB-50122 [CV] Remove temporary fix for MB-49820
- Closed