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

/_users/_all_docs keys filter returns not_found for valid keys

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Database Core
    • Labels:
      None

      Description

      The behaviour of the keys filter of /_users/_all_docs appears to have changed between v1.6 and v2. For known-existing keys (users), "error":"not_found" is returned. For example:

      v1.6:

      ❯ curl localhost:5984/_users/_all_docs                                                                                                
      {"total_rows":2,"offset":0,"rows":[
      {"id":"_design/_auth","key":"_design/_auth","value":{"rev":"1-75efcce1f083316d622d389f3f9813f7"}},
      {"id":"org.couchdb.user:dbreader","key":"org.couchdb.user:dbreader","value":{"rev":"1-d7ae446ad8ee720d23f0e420e0398f45"}}
      ]}
      ❯ curl -X POST -d '{"keys": ["org.couchdb.user:dbreader"]}' -H 'Content-Type: application/json' http://localhost:5984/_users/_all_docs
      {"total_rows":2,"offset":0,"rows":[
      {"id":"org.couchdb.user:dbreader","key":"org.couchdb.user:dbreader","value":{"rev":"1-d7ae446ad8ee720d23f0e420e0398f45"}}
      ]}
      

      v2.0.0:

      ❯ curl localhost:5984/_users/_all_docs                                                                                                
      {"total_rows":2,"offset":0,"rows":[
      {"id":"_design/_auth","key":"_design/_auth","value":{"rev":"1-75efcce1f083316d622d389f3f9813f7"}},
      {"id":"org.couchdb.user:dbreader","key":"org.couchdb.user:dbreader","value":{"rev":"1-75efcce1f083316d622d389f3f9813f7"}}
      ]}
      ❯ curl -X POST -d '{"keys": ["org.couchdb.user:dbreader"]}' -H 'Content-Type: application/json' http://localhost:5984/_users/_all_docs
      {"total_rows":2,"offset":0,"rows":[
      {"key":"org.couchdb.user:dbreader","value":{"error":"not_found"}
      ]}
      

      Is this expected behaviour in v2?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tlvince Tom Vincent
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: