Couchbase view returns duplicate document

I have a simple “account” document with the following view:

function (doc, meta) {
if ( doc.entityType === ‘account’ && doc.status != “DELETED” ) {
emit(, null);

Sometimes, (quite often), after adding an entry I get duplicate entries when query the db using that view. These entries are identical including their meta data.

Once the view retrieve a duplicate entry it will always return it as duplicate (the issues is consistently).

When checking the entries in the bucket I can see only one entry of this id thus the duplication is only in the view.

Once I create another view or delete and recreate this view, all duplicated entries are gone.

I’m using Couchbase 3.0.0 Enterprise Edition (build-1118)

Do any of these documents have an expiration, or are you only doing the logical deletion I can infer from the function?

Ahah! Looks like we have the exact same problem mate! (see here) I hope someone will find a way to fix that issue, it’s really annoying. For what it’s worth, I’ve tried to disable compaction on my test bucket and it seems to prevent the issue to happen.

Hm, interesting. Any chance either of you can describe how we can try to recreate the problem? Then I can get some folks to look at it.

You could read my post, I described the way you can recreate the problem.

It sounds like issue MB-13160. Can you try if disabling the bucket compaction makes a difference?

Ah, sorry. I had read it and replied, but I’ll look more carefully and if I have any questions will let you know.

Indeed, I created that issue. Guys, are you even reading posts?

Yes, I pointed out to @vmx that you’d created it. We’re definitely reading them and we’re tripping over ourselves to reply. We’ll take a step back and have a look at it.

Further discussions go on at MB-13160. It would be cool if you could provide more details about your load and also the update rates of documents. Your credentials should also work for JIRA, if they don’t feel free to post here.