What is the “revpos” value used for in CouchDB attachments?
-
22-07-2019 - |
Question
Here is an example:
"_attachments": {
"002-imgsq.jpg": {
"stub": true,
"content_type": "image/jpeg",
"length": 80074,
"revpos": 3
},
"016-imgsq.jpg": {
"stub": true,
"content_type": "image/jpeg",
"length": 100095,
"revpos": 4
},
"MASTER_img-square.jpg": {
"stub": true,
"content_type": "image/jpeg",
"length": 70611,
"revpos": 2
}
}
Solution
The attachment revpos is the doc's rev prefix (a sequential number) from when the attachment was added or updated. I believe it's only really used during replication to avoid copying attachments that have not changed since the last replication.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow