couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Joseph Davis (Resolved) (JIRA)" <>
Subject [jira] [Resolved] (COUCHDB-1390) Fix auth_cache etap test
Date Wed, 25 Jan 2012 18:26:45 GMT


Paul Joseph Davis resolved COUCHDB-1390.

    Resolution: Invalid


This was based on work in progress that I had. The underlying issue is I had temporarily changed
how reviving deleted documents works which ended up giving revived docs a different edit history
than what trunk does. After poking at other tests down the line I ended up reverting so that
the new merging code duplicates trunk's behavior exactly even though its kinda weird in other
edge cases.

For the curious, what happened was that the temporary behavior I had was that reviving a deleted
doc would extend the winning deleted edit branch. In the auth cache test what happens is that
we delete a doc and then recreate it. With trunk behavior it gets a revision at the root of
the revision tree (ie, "1-$sha"). The code I had for awhile gave this a revision of "3-$sha"
since it revived the deleted doc. This is what triggered the difference in the _revisions
member further down in the test.

So bottom line, there is a difference between couch_db:open_doc/3 when using a docid vs using
a #doc_info{} record. Specifically that the revision path in the returned #doc{} is a single
revision for #doc_info{}, but for docids (and #full_doc_info{} for completeness) its the entire
path from leaf to root.

So odd, but tracked down. Closing as invalid.
> Fix auth_cache etap test
> ------------------------
>                 Key: COUCHDB-1390
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>            Reporter: Paul Joseph Davis
>         Attachments: COUCHDB-1390.patch
> The auth_cache etap tests were failing for me. Debugged this to make sure it wasn't related
to something else. Commit message is:
>     Fix for the auth_cache etap
>     As it turns out, opening a doc by id is different than opening it using
>     a #doc_info record due to the inclusion of the full revision path. This
>     ended up breaking the auth_cache tests. This way includes the entire
>     revision path for all docs and not just first doc loads.
> Patching attaching in a few moments.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message