Hi all,
Assuming I have a document with an attachment and some fields, and that
this document has been replicated between source and target servers.
{
"_id": "551ffd9dc43cb73c257628d8a31e9e1f",
"_rev": "4-387d5d23b62e398421bddb10e16e740f",
"foo": "bar",
"baz": "quux",
"published": false,
"_attachments": {
"photo.jpg": {
"content_type": "image/jpeg",
"revpos": 2,
"digest": "md5-iOKjYGKWzEmEtMaqmYCtlA==",
"length": 3622469,
"stub": true
}
}
}
Let's say I change one of the fields on the source server; say "foo":
"bar" to "foo": "bar2". I then do a pull replication.
Sniffing the packets, it seems to me the entire document is replicated,
including attachments. I was under the impression couchdb would be able
to replicate the document independently of the attachments.
In other words couchdb would transfer just the "text/json" portion of
the document and not the attachment, i.e. less than ~1 kbyte vs. a few
megebytes in this case.
My experience seems to contradict my assumption. It looks like the
digest and revpos fields are used for this, as mentioned here:
http://stackoverflow.com/questions/1825117/what-is-the-revpos-value-used-for-in-couchdb-attachments
Is there something I am missing or perhaps a configuration option I am
not setting properly?
Thanks.