You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "nickva (via GitHub)" <gi...@apache.org> on 2023/08/02 22:13:19 UTC

[GitHub] [couchdb] nickva commented on issue #4714: Changes feed with descending=true is incorrect

nickva commented on issue #4714:
URL: https://github.com/apache/couchdb/issues/4714#issuecomment-1663042658

   I guess a plausible interpretation of the pending number is that it reflects both the direction and offset from the end of the changes feed, regardless in which direction we're traversing it.
   
   In a simple `q=1` case with 5 changes:
   
    * If `limit=2&descending=false` we emit `2` docs and get pending = `+3`. That is, `3` more docs to go forward to get to `5` (the last seq value).
   
    * If we do `limit=2&descending=true`, we get pending = `-2` since we have to go `2` docs _backwards_ to get to the top (`5`). 
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org