Details
Description
After a couple of discussion, here are the key steps of the problem:
1. on CBL, create a doc contains only a string type of key/value, push to SG
2. on CBL, get this doc by id, update the doc by adding another string type of key/value, push to SG, then it looks like this:
3. on CBL get this doc by id, update the doc by adding a Blob, push to SG, then it looks like this:
{
|
"_attachments": {
|
"blob_/blob1": {
|
"content_type": "text/plain",
|
"digest": "sha1-uYBbYBb5WP9aN28rlkmsA5PQg7k=",
|
"length": 12,
|
"revpos": 3,
|
"stub": true
|
}
|
},
|
"_id": "blob-test-1",
|
"_rev": "3-xxx",
|
"blob1": {
|
"@type": "blob",
|
"content_type": "text/plain",
|
"digest": "sha1-uYBbYBb5WP9aN28rlkmsA5PQg7k=",
|
"length": 12
|
},
|
"k1": "string value 1",
|
"k2": "string value 2"
|
}
|
4. on CBL get this doc by id, update the doc by adding a string value, no touch to the blob, push to SG, then it looks like this:
{
|
"_attachments": {
|
"blob_/blob1": {
|
"content_type": "text/plain",
|
"digest": "sha1-uYBbYBb5WP9aN28rlkmsA5PQg7k=",
|
"length": 12,
|
"revpos": 4,
|
"stub": true
|
}
|
},
|
"_id": "blob-test-1",
|
"_rev": "4-xxx",
|
"blob1": {
|
"@type": "blob",
|
"content_type": "text/plain",
|
"digest": "sha1-uYBbYBb5WP9aN28rlkmsA5PQg7k=",
|
"length": 12
|
},
|
"k1": "string value 1",
|
"k2": "string value 2"
|
"newk1": "string added after blob"
|
}
|
Expect:
"revpos": 3 in "_attachments" because the blob is not updated at step 4.
Actual:
"revpos": 4 in "_attachments" revpos got increased even though there is no touch on the blob during the doc update
Attachments
Issue Links
- relates to
-
CM-977 Write test cases to cover blob update revision changes
- Done