Description
As of now when we need info about source bucket, e.g., bucket uuid and bucket password, we use go-couchbase API to get a go-couchbase.Bucket object and then retrieve the info from the object. This operation is very heavy since it results in three http calls to source node and a big in-memory object:
"GET /pools HTTP/1.1" 200 798 - Go-http-client/1.1
"GET /pools/default?uuid=3f1439a92f432a37c46e6bbb81aed1a6 HTTP/1.1" 200 4185 - Go-http-client/1.1
"GET /pools/default/buckets?v=67944647&uuid=3f1439a92f432a37c46e6bbb81aed1a6 HTTP/1.1" 200 9885 - Go-http-client/1.1
The same effect can be achieved through a single http call.
The plan is to have goxdcr make a http call directly instead of using go-couchbase api. This has another benefit that it makes it easier to specify the user-agent header in the http call, as required by MB-22509. In other word, this MB can be considered a pre-requisite fix for MB-22509. That is why this MB is targeted for 4.6.2 as well.
Attachments
Issue Links
For Gerrit Dashboard: MB-23071 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
74414,7 | MB-23071 reduce number of connections to source node by making direct http call | master | goxdcr | Status: MERGED | +2 | +1 |
75173,2 | MB-23071 reduce number of connections to source node by making direct http call | watson | goxdcr | Status: MERGED | +2 | +1 |