couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger Binns (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-582) _changes filter missing updates
Date Sun, 29 Nov 2009 03:54:20 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783355#action_12783355
] 

Roger Binns commented on COUCHDB-582:
-------------------------------------

Not quite as good as tests, but here is an exact description of what they should do.

Create a filter function:

function(doc, req) {
  // log("filter "+toJSON(doc));  -- useful for debugging and confirming filter was even called
 return doc.type=="A" || doc._deleted;
}

Now watch _changes with that filter function.  You should verify that there is always at least
one row returned.  Create several docs in a row with doc.type="A".  Delete them.  There should
always be at least one row returned.  (Bonus points for matching up returned rows with creation/deletion
activity.)

A related issue is that _changes requests return based on if there was data before filtering.
 Consequently running the above will return no rows if you create doc.type="B".  It would
be more efficient to only return if there are rows *after* filtering in which the above test
can continue to run and should not return if you create doc.type="B".

> _changes filter missing updates
> -------------------------------
>
>                 Key: COUCHDB-582
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-582
>             Project: CouchDB
>          Issue Type: Bug
>          Components: JavaScript View Server
>            Reporter: Chris Anderson
>            Assignee: Chris Anderson
>             Fix For: 0.11
>
>
> reported on the user mailing list: 
> http://mail-archives.apache.org/mod_mbox/couchdb-user/200911.mbox/%3c4B10BD2C.5070200@rogerbinns.com%3e
> I know there is work to be done on the filter mechanism (specifically around process
reuse and concurrency)
> The current implementation requires a process per connected user. This should be not
that hard to patch.

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