couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davisp <...@git.apache.org>
Subject [GitHub] couchdb-couch-mrview pull request: 2650 etag fixes
Date Thu, 21 May 2015 15:41:47 GMT
Github user davisp commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch-mrview/pull/18#discussion_r30815269
  
    --- Diff: src/couch_mrview_util.erl ---
    @@ -1016,3 +1019,26 @@ get_view_queries({Props}) ->
             _ ->
                 throw({bad_request, "`queries` member must be a array."})
         end.
    +
    +maybe_etag_respond(Req, Meta, undefined) ->
    +    undefined;
    +maybe_etag_respond(Req, Meta, PartialEtag) ->
    +    {MetaTerm, _Rest} = proplists:split(Meta, [total, offset, update_seq]),
    --- End diff --
    
    Unless I'm mistaken, for single node requests (ie, 5986) the update_seq only comes back
when requested by the client [1] and in the clustered case it never comes back [2].
    
    Thus unless you're in a very specific case (you requested update_seq=true on 5986) then
this ETag generation will fail to properly invalidate a response when a database has been
changed.
    
    [1] https://github.com/apache/couchdb-couch-mrview/blob/master/src/couch_mrview.erl#L526-L530
    [2] https://github.com/apache/couchdb-fabric/blob/master/src/fabric_view_all_docs.erl#L148


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message