Description
Currently, the compaction daemon in ns_server issues a view cleanup (mapreduce views) request against every existent vbucket database in a node [1]. This is unnecessary as design documents live exclusively on the master database. It's also inefficient, as it implies scanning all the vbucket databases for design documents, which simply don't exist there.
Therefore it's enough to call couch_view:cleanup_index_files/1 against the master database only.
[1] - https://github.com/couchbase/ns_server/blob/master/src/compaction_daemon.erl#L457