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

j ermouth commented on COUCHDB-2537:
------------------------------------

They conform – specs do not in any way deny this, as far as I know.

Let me show one of scenarios, where any kind of value of local_seq is useful.

Imagine you have changes feed, that is piped throught some kind of validator. 
Not just ddoc filter function, but something much more complex, outside of 
CouchDB. 

This validator just received new doc, feed ‘tick’. Validator must decide to 
pass this tick through or to strip it. To do it validator must, for example, 
read some _view or use already cached view entry.

How to decide should validator use cached value or refresh cache? _rev is 
unreliable, so better way is to use local_seq.

In brief: local_seq is useful even if it’s not a number, so please don’t touch 
it.

> Propose removal of ?local_seq=true from the GET /db/doc API for CouchDB 2.0
> ---------------------------------------------------------------------------
>
>                 Key: COUCHDB-2537
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2537
>             Project: CouchDB
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: Database Core
>            Reporter: Glynn Bird
>
> Prior to CouchDB 2.0, a document could be fetched thus:
> /db/8E795956?local_seq=true
> {Code}
> { _id: '8E795956',
>   _rev: '1-4fffae881c4d89048cf9319c2ae021a1',
>   test: 'somestuff',
>   _local_seq: 1 }
> {Code}
> with the _local_seq being returned indicating 'Document’s sequence number in 
> current database'.
> Post CouchDB2.0, this quantity makes little sense as it represents the local 
> sequence number within the shard.
> I propose that
> * ?local_seq=true is deprecated
> * _local_seq is no longer returned in the response
> * the documentation is updated accordingly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to