You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/03/30 13:12:34 UTC

[GitHub] [couchdb] dianabarsan opened a new issue #2733: Requests to `_changes` with `decending=true` ignore `since`

dianabarsan opened a new issue #2733: Requests to `_changes` with `decending=true` ignore `since`
URL: https://github.com/apache/couchdb/issues/2733
 
 
   ## Description
   
   When passing `descending=true` to `_changes`, CouchDB completely ignores the `since` parameter and always resolves with results as if `since=now`. It even ignores a malformed seq. 
   
   ## Steps to Reproduce
   
   ```
   curl "http://<your_host>/<your_db>/_changes?limit=1&descending=true&since=NOT_A_SEQ"
   ```
   
   ## Expected Behaviour
   
   According to the documentation, `descending` means:
   > Return the change results in descending sequence order (most recent change first). Default is false.
   
   No other interactions are documented. I would expect it to respect the `since` parameter. 
   
   ## Your Environment
   
   * CouchDB version used: 3.0, 2.3.1, 2.2, 2.1, 1.7 **
   * Operating system and version: Manjaro 19
   
   ** Couch 1.7 does return a badarg when passing a malformed `since` , but a correct `since` is ignored. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] wohali commented on issue #2733: Requests to `_changes` with `descending=true` ignore `since`

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #2733: Requests to `_changes` with `descending=true` ignore `since`
URL: https://github.com/apache/couchdb/issues/2733#issuecomment-606107854
 
 
   Hi @dianabarsan , thanks for this.
   
   I'm afraid to say that given you tested this all the way back to 1.7, this is probably a documentation error.
   
   [The code](https://github.com/apache/couchdb/blob/87edbaecd2cdb7f9266364e5fec65e31fe1fc251/src/couch/src/couch_changes.erl#L71-L78) is pretty clear that the since token is ignored when descending (`rev`) is specified. I don't know if enhancing CouchDB to support this is possible, but I'll let others respond.
   
   For now I'm changing this to an enhancement request. Once we've determined if this is possible or not, we can then decide if this goes forward in development, or instead turns into a "fix the docs" ticket instead.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services