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

ASF GitHub Bot commented on COUCHDB-2978:
-----------------------------------------

GitHub user garrensmith opened a pull request:

    https://github.com/apache/couchdb-chttpd/pull/111

    Create md5 etag for _local docs

    This makes a unique ETAG for _local docs, so that they are cached
    correctly, and fetched again when the document changes.
    
    fixes COUCHDB-2978

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/couchdb-chttpd local-docs-2978

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-chttpd/pull/111.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #111
    
----
commit 1ca86421bafd17cc5b954d9075e3a053ea951f6a
Author: Garren Smith <[email protected]>
Date:   2016-04-07T13:47:05Z

    Create md5 etag for _local docs
    
    This makes a unique ETAG for _local docs, so that they are cached
    correctly, and fetched again when the document changes.
    
    fixes COUCHDB-2978

----


> Stale ETags are re-used for _local docs
> ---------------------------------------
>
>                 Key: COUCHDB-2978
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2978
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>            Reporter: Nolan Lawson
>            Priority: Blocker
>             Fix For: 1.7.0
>
>
> CouchDB re-uses the same ETags for _local documents even when the content of 
> the _local document has changed, meaning that clients who cache based on the 
> ETag may end up with permanently stale content. To reproduce the bug, it's 
> simply:
> 1. Create a _local doc
> 2. Fetch the doc, ETag is "0-1"
> 3. Delete the database (or the _local doc)
> 4. Recreate the database (or the _local doc), insert a *changed* _local doc
> 5. Fetch the doc, ETag is still "0-1" and therefore the client may end up 
> with a stale version.
> Here are related issues in PouchDB and WebKit for further details:
> - [PouchDB bug|https://github.com/pouchdb/pouchdb/issues/5010]
> - [WebKit bug|https://bugs.webkit.org/show_bug.cgi?id=156048]



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

Reply via email to