couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filipe Manana (JIRA)" <j...@apache.org>
Subject [jira] Updated: (COUCHDB-640) Detect when a view is not valid for a database
Date Tue, 16 Feb 2010 20:09:27 GMT

     [ https://issues.apache.org/jira/browse/COUCHDB-640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Filipe Manana updated COUCHDB-640:
----------------------------------

    Attachment: couchdb-640-trunk.patch

@Paul

Basically, I detect if the seq number field of the view group is greater than the update seq
number of the DB. If so, regenerate the view from scratch.

I dunno if there's a way to find all the invalid data in the view (data that doesn't match
the DB content) and remove it from the view.

If needed, I can write an Etap test (even if the patch is so small).

thanks for reviewing it

> Detect when a view is not valid for a database
> ----------------------------------------------
>
>                 Key: COUCHDB-640
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-640
>             Project: CouchDB
>          Issue Type: Bug
>          Components: JavaScript View Server
>    Affects Versions: 0.11
>            Reporter: Paul Joseph Davis
>         Attachments: couchdb-640-trunk.patch
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message