Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Couchbase Server 2.0

Views seem to lose their way

2 replies [Last post]
  • Login or register to post comments
Wed, 02/06/2013 - 16:40
pgrigor
Offline
Joined: 01/08/2013
Groups: None

Hi there,

I have several views in production. Every once and a while I'll get a document returned for a view which *should not* be emitted by the map function. All data is flushed to disk, the document is verified to be updated correctly but the view still returns it.

For instance:

1/ I'll enter a document with the status "new";
2/ I'll have a "new" view which returns all "new" documents;
3/ The "new" view correctly returns the document created in 1/;
4/ I'll save the document with a status of "old";
5/ The "new" view will still return the document, even though the status should not be triggering an emit.

If I add a new view to the design document in question and re-publish the view created in 2/ it will then have the correct results, so it's not the document format or map error.

Any ideas?

Top
  • Login or register to post comments
Wed, 02/06/2013 - 23:50
tgrall
Offline
Joined: 09/05/2012
Groups: None

Hello PGrigor,

If I understand correctly your problem you are in the typical behavior of the "eventually consistent" query engine, but we have solution for that.

To be sure that Couchbase server provide predictable fast access to the data most the operation are done asynchronously (write to the disk, index udpate, ...) The flip size of this is that sometimes the data you see in a query are not the result you expect. This is "normal behavior".

The solution to this is to control on your query the update of the index, you can do that using the "stale" parameter, I invite you to look at this page:
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-views-writi...

So if you are using stale=false in your application you should see the new result (if the document has been saved on disk)

Let me know ...

Regards

__________________

Tug
@tgrall

Top
  • Login or register to post comments
Thu, 02/07/2013 - 00:53
pgrigor
Offline
Joined: 01/08/2013
Groups: None

No that's not the problem at all. The views have "leftover" records in them that never get updated or cleared. I'm talking about artifacts in the index that are left over *hours* after the document shoudl have been updated in the index. The views are being accessed with stale=false and after all docs have been flushed to disk.

This is *definitely* a bug.

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker