Details
-
Improvement
-
Resolution: Fixed
-
Major
-
2.0, 2.0.1
-
Security Level: Public
Description
Currently the replicator worker is getting doc metadata from the changes feed (seq tree) and then getting the document body by doing a lookup in the id tree of the vbucket.
This was inherited from the CouchDB original replicator I wrote, where it couldn't be avoided because revision tree was only accessible in id tree - however for Couchbase we don't have those trees, and the values for both the seq and id trees are the same.
This change avoids unnecessary btree lookups in the source cluster's vbucket databases.
I started over an year ago to do it for CouchDB, but it was limited for first version of a doc (where there's no need to gets its rev tree) and didn't touch it anymore (this was before we removed revision trees, changed file formats, etc). Gerrit change: