Couchbase Server

Reduce functions calling emit() lead to a crash