MB-9007:  f2c0892f3df080afb409e3a24aac856f2a8f3f5d

Change-Id: Ib59b7d501cef5889afcbdaec0dd89f38348b77a8
MB-8974:  f5376d2689a98b2df7ae934deec6c8f479d52759
Reviewed-on: http://review.couchbase.org/28781
Reviewed-by: Junyi Xie <junyi.couchbase@gmail.com>
Reviewed-by: Philip Labee <philip@couchbase.com>
Tested-by: Philip Labee <philip@couchbase.com>