GitHub user KlausTrainer opened a pull request:

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

    Don't set random ETag header for views

    This fixes the issue that by setting a random ETag header, we implicitly
    promised that there's a chance of a cache hit where there was no chance.
    
    For 2.0, we simply remove the random ETag without replacement, in order
    to not accidentally cause useless cache bloat in clients.
    
    Here's Robert Newson's idea for an implementation that should be no more
    expensive than what we do today:
    
    1) delay the response until we have heard from one shard of each range
    2) from this, construct the etag (we can change the workers to return
       more information along with their first rows (if any))
    3) send 304 if the etag matches the header
    
    That is, we have to hear from one shard per range to form the view, so
    we can build a useful etag from that.
    
    COUCHDB-2859

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

    $ git pull https://github.com/KlausTrainer/couchdb-chttpd 
2859-remove-view-etags

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

    https://github.com/apache/couchdb-chttpd/pull/92.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 #92
    
----
commit 2980714d0dfc7763d0c915f73db2bd4558862abe
Author: Klaus Trainer <[email protected]>
Date:   2015-11-02T17:33:19Z

    Don't set random ETag header for views
    
    This fixes the issue that by setting a random ETag header, we implicitly
    promised that there's a chance of a cache hit where there was no chance.
    
    For 2.0, we simply remove the random ETag without replacement, in order
    to not accidentally cause useless cache bloat in clients.
    
    Here's Robert Newson's idea for an implementation that should be no more
    expensive than what we do today:
    
    1) delay the response until we have heard from one shard of each range
    2) from this, construct the etag (we can change the workers to return
       more information along with their first rows (if any))
    3) send 304 if the etag matches the header
    
    That is, we have to hear from one shard per range to form the view, so
    we can build a useful etag from that.
    
    COUCHDB-2859

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to