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

Implement _security as _local doc with revision trees

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • Database Core
    • None
    • Dont Know

    Description

      We had a discussion [1] a while back about updating the _security object so that it could be replicated (internally) in a cluster or similar environment. The basic gist was "update _local docs to have a revision tree, update _security to be a _local doc with docid "_local/_security" and keep the current _security API for a version or two for backwards compatibility (or forever, what color is your bike shed?)"

      So I did that.

      Basic patch progression is:

      1. Refactor revision merging logic so that we can split it out of couch_db_updater's code path for updating normal docs.
      2. Implement _local docs with #full_doc_info{} records (and thus revision trees)
      3. Implement _security as _local/_security

      These things are done. Tests should theoretically pass after each patch but I haven't gone back and tried. They definitely pass (minus auth_cache which I just submitted a fix for) now except for replication.js appears to fail for random reasons. I can't quite decide if I've introduced this or if it just fails randomly. Rather than run it a lot more times and continue to be confused I'm starting this ticket so I can have other people test and tell me their results.

      Also, the test suite is rather wonky on trunk with segfaults. We should really look into that more.

      Patches forth coming. I've also pushed the branch to [2].

      [1] http://grokbase.com/t/couchdb.apache.org/dev/2011/08/the-security-object-should-be-versioned/17rfmmtlu3lagqvgyq7cay26dqk4
      [2] http://git-wip-us.apache.org/repos/asf?p=couchdb.git;a=log;h=refs/heads/new-security-object

      Attachments

        1. 0001-Refactor-revision-merging.patch
          25 kB
          Paul Joseph Davis
        2. 0002-Replace-_local-doc-sequence-with-revision-trees.patch
          11 kB
          Paul Joseph Davis
        3. 0003-Prevent-multiple-updates-to-a-single-_local-doc.patch
          2 kB
          Paul Joseph Davis
        4. 0004-Implement-_security-as-a-_local-doc.patch
          10 kB
          Paul Joseph Davis

        Activity

          People

            Unassigned Unassigned
            paul.joseph.davis Paul Joseph Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: