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

Old Revisions Not Removed from Index (intermittent)

No replies
  • Login or register to post comments
Wed, 12/26/2012 - 11:36
lbryan
Offline
Joined: 12/26/2012
Groups: None

View indexes point to a document. When updating a document, we usually see the old revision removed from the index and the new revision put in it's place. We're hitting some cases where the old revision remains as well, causing duplicate records in our index. When we hit this state, nothing seems to remove the duplicate content. I've tried 1) waiting 24 hours and, 2) manually compacting, and 3) querying with ?stale=false . The only way I have been able to remove the duplicate data is to slightly modify my view function by adding a blank line to the top. This caused couchbase to think it's a new view function and recalculate the whole index.

What is causing the old revisions to not be removed? I've seen the problem twice. Here were the conditions:

1) In development. I made hundreds of view functions, some of which were inefficient and contained 500+ "if" statements. Moving the views to their own design doc alleviated this.

2) On a live site, we ran couchbase for about 30 minutes. It started to get slow, and I noticed a compaction was running. I cancelled the compaction and told it to only run between 2am and 9am. Then I checked and saw 3 view entries for a single document. All were for different revisions of that document.

This is what I am using :

Design documents: 11
Document records: 4.5 Million
Index with issue records: 4 Million

Centos 6.3 with Moxi Client Library
Couchbase 2.0 - Open Source

Top
  • 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