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:
|For Gerrit Dashboard: &For+MB-7415=message:MB-7415|
|24540,2||bp: MB-7415: fast doc lookups using doc ptr instead of id||ns_server||Status: ABANDONED||+1||+1|
|24557,1||Merge remote-tracking branch 'couchbase/master' into b202||ns_server||Status: MERGED||+2||+1|
|25023,1||For toybuild: MB-7415: fast doc lookups using doc ptr instead of id||ns_server||Status: ABANDONED||0||0|