Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-640

Detect when a view is not valid for a database

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.11
    • None
    • JavaScript View Server
    • None

    Description

      It was mentioned on IRC that if someone restores a database without restoring a view then there's nothing that detects if the view is still valid. Ie, it may reflect an update_seq that the restoration lost.

      In the check for kicking off a view update we should check if there is an incompatibility between what's been calculated in the view vs what the db update sequence is at. The current logic will just ignore and return the invalid view data (because of how stale=ok works which is good).

      Should be an easy bug to fix if anyone's interested. The code should be pretty contained to couch_view.erl and couch_view_group.erl

      Attachments

        1. couchdb-640-trunk-3.patch
          9 kB
          Filipe David Borba Manana
        2. couchdb-640-trunk.patch
          3 kB
          Filipe David Borba Manana

        Activity

          People

            paul.joseph.davis Paul Joseph Davis
            paul.joseph.davis Paul Joseph Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: