Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the "revpos" value used for in CouchDB attachments?

Tags:

couchdb

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
       }
   }
like image 677
Robert Campbell Avatar asked Dec 01 '09 09:12

Robert Campbell


1 Answers

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.

like image 124
Matt Goodall Avatar answered Nov 07 '22 05:11

Matt Goodall