Bucket upsert returns before insert operation completes

Hey @sp111,

It looks like you are using N1QL to retrieve the results of your poll in this instance. Due to the nature of Couchbase, our indexes are updated asynchronously from our Key/Value store itself, this means that the index may not be immediately updated after you perform your upsert. You should use the query.consistency(couchbase.N1qlQuery.Consistency) to cause your query to wait until the index is up to date.

Cheers, Brett