Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-1206

View ETags may be incorrect if ?include_docs=true is specified

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.1
    • 1.1.1, 1.2
    • None
    • None

    Description

      Change COUCHDB-799 altered the way ETags are assigned to views, by having the ETag change only when the view index changes, not when any document changes. Unfortunately this means that a view with the "?include_docs=true" option can return an incorrect ETag. The reason is that if a document in the view is changed, but the change doesn't affect the view index, the result of the GET will change (it will contain the document's updated contents), but the ETag won't. This can result in stale data if the client uses a conditional GET, because it'll get a 304 even though the prior response is out of date.

      Robert Newson's analysis on the user@ list is "I think the sanest fix is to make view etags for include_docs=true use the original algorithm, so that they always change if the database changes."

      Attachments

        Issue Links

          Activity

            People

              rnewson Robert Newson
              snej Jens Alfke
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Slack

                  Issue deployment