update metadata on demand

Change-Id: Id8b9cd8a347407f2bac2066f79e68cbe977a0290
Reviewed-on: http://review.couchbase.org/24337
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>