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

Conflicts introduced by recreating docs with attachments

    Details

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

      Description

      When a document is re-created with an attachment it receives a non-deterministic revision. This is due to a fairly old commit [1] that introduced the behavior by accidentally including information about revisions on disk into the revision id calculation when the revision id was being calculated by couch_db_updater when it realized that the update was re-creating a document that was previously deleted.

      I'm opening a PR with the fix.

      [1] https://github.com/apache/couchdb-couch/commit/08a94d582cd3086ebcbd51ad8ac98ca6df98a1b7

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user davisp opened a pull request:

          https://github.com/apache/couchdb-couch/pull/218

          Make revision generation deterministic

          This removes the influence of the attachment disk information when
          generating revisions when a document is being recreated (ie, it existed
          once but has been deleted).

          COUCHDB-3255

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/cloudant/couchdb-couch COUCHDB-3255-fix-new-revid

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/couchdb-couch/pull/218.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #218


          commit 656967aa13b76e60806df040db0a92d164d96d72
          Author: Paul J. Davis <paul.joseph.davis@gmail.com>
          Date: 2016-12-13T23:30:46Z

          Make revision generation deterministic

          This removes the influence of the attachment disk information when
          generating revisions when a document is being recreated (ie, it existed
          once but has been deleted).

          COUCHDB-3255


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user davisp opened a pull request: https://github.com/apache/couchdb-couch/pull/218 Make revision generation deterministic This removes the influence of the attachment disk information when generating revisions when a document is being recreated (ie, it existed once but has been deleted). COUCHDB-3255 You can merge this pull request into a Git repository by running: $ git pull https://github.com/cloudant/couchdb-couch COUCHDB-3255 -fix-new-revid Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-couch/pull/218.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #218 commit 656967aa13b76e60806df040db0a92d164d96d72 Author: Paul J. Davis <paul.joseph.davis@gmail.com> Date: 2016-12-13T23:30:46Z Make revision generation deterministic This removes the influence of the attachment disk information when generating revisions when a document is being recreated (ie, it existed once but has been deleted). COUCHDB-3255
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 58382d441e5ed499dce5904229d176068c17a5bc in couchdb-couch's branch refs/heads/master from Paul Joseph Davis
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=58382d4 ]

          Make revision generation deterministic

          This removes the influence of the attachment disk information when
          generating revisions when a document is being recreated (ie, it existed
          once but has been deleted).

          Big thanks to @tonysun83 for getting a reproducer as well as the test
          included with this PR.

          COUCHDB-3255

          Show
          jira-bot ASF subversion and git services added a comment - Commit 58382d441e5ed499dce5904229d176068c17a5bc in couchdb-couch's branch refs/heads/master from Paul Joseph Davis [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=58382d4 ] Make revision generation deterministic This removes the influence of the attachment disk information when generating revisions when a document is being recreated (ie, it existed once but has been deleted). Big thanks to @tonysun83 for getting a reproducer as well as the test included with this PR. COUCHDB-3255
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit b8a06c319aab95802c489383c19b40926269b896 in couchdb-couch's branch refs/heads/master from Paul Joseph Davis
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=b8a06c3 ]

          Merge branch 'COUCHDB-3255-fix-new-revid'

          Show
          jira-bot ASF subversion and git services added a comment - Commit b8a06c319aab95802c489383c19b40926269b896 in couchdb-couch's branch refs/heads/master from Paul Joseph Davis [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=b8a06c3 ] Merge branch ' COUCHDB-3255 -fix-new-revid'
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/couchdb-couch/pull/218

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/couchdb-couch/pull/218
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 129a8e38d71444b2eec955817b390374635eecc0 in couchdb-couch's branch refs/heads/COUCHDB-3287-pluggable-storage-engines from Paul Joseph Davis
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=129a8e3 ]

          Ensure deterministic revisions for attachments

          This re-fixes a corner case when recreating a document with an
          attachment in a single multipart request. Since we don't detect that we
          need a new revision until after the document has been serialized we need
          to be able to deserialize the body so that we can generate the same
          revisions regardless of the contents of the database. If we don't do
          this then we end up including information from the position of the
          attachment on disk in the revision calculation which can introduce
          branches in the revision tree.

          I've left this as a separate commit from the pluggable storage engine
          work so that its called out clearly for us to revisit.

          COUCHDB-3255

          Show
          jira-bot ASF subversion and git services added a comment - Commit 129a8e38d71444b2eec955817b390374635eecc0 in couchdb-couch's branch refs/heads/ COUCHDB-3287 -pluggable-storage-engines from Paul Joseph Davis [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=129a8e3 ] Ensure deterministic revisions for attachments This re-fixes a corner case when recreating a document with an attachment in a single multipart request. Since we don't detect that we need a new revision until after the document has been serialized we need to be able to deserialize the body so that we can generate the same revisions regardless of the contents of the database. If we don't do this then we end up including information from the position of the attachment on disk in the revision calculation which can introduce branches in the revision tree. I've left this as a separate commit from the pluggable storage engine work so that its called out clearly for us to revisit. COUCHDB-3255
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit f3cf0a938140fa3b1f14ed7f0cf69cfbf67be363 in couchdb-couch's branch refs/heads/COUCHDB-3287-pluggable-storage-engines from Paul Joseph Davis
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=f3cf0a9 ]

          Ensure deterministic revisions for attachments

          This re-fixes a corner case when recreating a document with an
          attachment in a single multipart request. Since we don't detect that we
          need a new revision until after the document has been serialized we need
          to be able to deserialize the body so that we can generate the same
          revisions regardless of the contents of the database. If we don't do
          this then we end up including information from the position of the
          attachment on disk in the revision calculation which can introduce
          branches in the revision tree.

          I've left this as a separate commit from the pluggable storage engine
          work so that its called out clearly for us to revisit.

          COUCHDB-3255

          Show
          jira-bot ASF subversion and git services added a comment - Commit f3cf0a938140fa3b1f14ed7f0cf69cfbf67be363 in couchdb-couch's branch refs/heads/ COUCHDB-3287 -pluggable-storage-engines from Paul Joseph Davis [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=f3cf0a9 ] Ensure deterministic revisions for attachments This re-fixes a corner case when recreating a document with an attachment in a single multipart request. Since we don't detect that we need a new revision until after the document has been serialized we need to be able to deserialize the body so that we can generate the same revisions regardless of the contents of the database. If we don't do this then we end up including information from the position of the attachment on disk in the revision calculation which can introduce branches in the revision tree. I've left this as a separate commit from the pluggable storage engine work so that its called out clearly for us to revisit. COUCHDB-3255
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 327c053c6e60d29ae82e63da04ff7c820f180b52 in couchdb-couch's branch refs/heads/COUCHDB-3287-pluggable-storage-engines from Paul Joseph Davis
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=327c053 ]

          Ensure deterministic revisions for attachments

          This re-fixes a corner case when recreating a document with an
          attachment in a single multipart request. Since we don't detect that we
          need a new revision until after the document has been serialized we need
          to be able to deserialize the body so that we can generate the same
          revisions regardless of the contents of the database. If we don't do
          this then we end up including information from the position of the
          attachment on disk in the revision calculation which can introduce
          branches in the revision tree.

          I've left this as a separate commit from the pluggable storage engine
          work so that its called out clearly for us to revisit.

          COUCHDB-3255

          Show
          jira-bot ASF subversion and git services added a comment - Commit 327c053c6e60d29ae82e63da04ff7c820f180b52 in couchdb-couch's branch refs/heads/ COUCHDB-3287 -pluggable-storage-engines from Paul Joseph Davis [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=327c053 ] Ensure deterministic revisions for attachments This re-fixes a corner case when recreating a document with an attachment in a single multipart request. Since we don't detect that we need a new revision until after the document has been serialized we need to be able to deserialize the body so that we can generate the same revisions regardless of the contents of the database. If we don't do this then we end up including information from the position of the attachment on disk in the revision calculation which can introduce branches in the revision tree. I've left this as a separate commit from the pluggable storage engine work so that its called out clearly for us to revisit. COUCHDB-3255
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit cde57808f191b6894b1d599abf978b7ca79123e7 in couchdb-couch's branch refs/heads/COUCHDB-3287-pluggable-storage-engines from Paul Joseph Davis
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=cde5780 ]

          Ensure deterministic revisions for attachments

          This re-fixes a corner case when recreating a document with an
          attachment in a single multipart request. Since we don't detect that we
          need a new revision until after the document has been serialized we need
          to be able to deserialize the body so that we can generate the same
          revisions regardless of the contents of the database. If we don't do
          this then we end up including information from the position of the
          attachment on disk in the revision calculation which can introduce
          branches in the revision tree.

          I've left this as a separate commit from the pluggable storage engine
          work so that its called out clearly for us to revisit.

          COUCHDB-3255

          Show
          jira-bot ASF subversion and git services added a comment - Commit cde57808f191b6894b1d599abf978b7ca79123e7 in couchdb-couch's branch refs/heads/ COUCHDB-3287 -pluggable-storage-engines from Paul Joseph Davis [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=cde5780 ] Ensure deterministic revisions for attachments This re-fixes a corner case when recreating a document with an attachment in a single multipart request. Since we don't detect that we need a new revision until after the document has been serialized we need to be able to deserialize the body so that we can generate the same revisions regardless of the contents of the database. If we don't do this then we end up including information from the position of the attachment on disk in the revision calculation which can introduce branches in the revision tree. I've left this as a separate commit from the pluggable storage engine work so that its called out clearly for us to revisit. COUCHDB-3255
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 09a4de61eddde34d4cf1a9422f7bc586eb190e1b in couchdb-couch's branch refs/heads/COUCHDB-3287-pluggable-storage-engines from Paul Joseph Davis
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=09a4de6 ]

          Ensure deterministic revisions for attachments

          This re-fixes a corner case when recreating a document with an
          attachment in a single multipart request. Since we don't detect that we
          need a new revision until after the document has been serialized we need
          to be able to deserialize the body so that we can generate the same
          revisions regardless of the contents of the database. If we don't do
          this then we end up including information from the position of the
          attachment on disk in the revision calculation which can introduce
          branches in the revision tree.

          I've left this as a separate commit from the pluggable storage engine
          work so that its called out clearly for us to revisit.

          COUCHDB-3255

          Show
          jira-bot ASF subversion and git services added a comment - Commit 09a4de61eddde34d4cf1a9422f7bc586eb190e1b in couchdb-couch's branch refs/heads/ COUCHDB-3287 -pluggable-storage-engines from Paul Joseph Davis [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=09a4de6 ] Ensure deterministic revisions for attachments This re-fixes a corner case when recreating a document with an attachment in a single multipart request. Since we don't detect that we need a new revision until after the document has been serialized we need to be able to deserialize the body so that we can generate the same revisions regardless of the contents of the database. If we don't do this then we end up including information from the position of the attachment on disk in the revision calculation which can introduce branches in the revision tree. I've left this as a separate commit from the pluggable storage engine work so that its called out clearly for us to revisit. COUCHDB-3255
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 0f4e1a7fdb3a3816185d2c1cebf4439a4c359872 in couchdb-couch's branch refs/heads/COUCHDB-3287-pluggable-storage-engines from Paul Joseph Davis
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=0f4e1a7 ]

          Ensure deterministic revisions for attachments

          This re-fixes a corner case when recreating a document with an
          attachment in a single multipart request. Since we don't detect that we
          need a new revision until after the document has been serialized we need
          to be able to deserialize the body so that we can generate the same
          revisions regardless of the contents of the database. If we don't do
          this then we end up including information from the position of the
          attachment on disk in the revision calculation which can introduce
          branches in the revision tree.

          I've left this as a separate commit from the pluggable storage engine
          work so that its called out clearly for us to revisit.

          COUCHDB-3255

          Show
          jira-bot ASF subversion and git services added a comment - Commit 0f4e1a7fdb3a3816185d2c1cebf4439a4c359872 in couchdb-couch's branch refs/heads/ COUCHDB-3287 -pluggable-storage-engines from Paul Joseph Davis [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=0f4e1a7 ] Ensure deterministic revisions for attachments This re-fixes a corner case when recreating a document with an attachment in a single multipart request. Since we don't detect that we need a new revision until after the document has been serialized we need to be able to deserialize the body so that we can generate the same revisions regardless of the contents of the database. If we don't do this then we end up including information from the position of the attachment on disk in the revision calculation which can introduce branches in the revision tree. I've left this as a separate commit from the pluggable storage engine work so that its called out clearly for us to revisit. COUCHDB-3255
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 4b4238718c0a2dbf02cc00f6a855ff8ff8d5cd59 in couchdb-couch's branch refs/heads/COUCHDB-3287-pluggable-storage-engines from Paul Joseph Davis
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=4b42387 ]

          Ensure deterministic revisions for attachments

          This re-fixes a corner case when recreating a document with an
          attachment in a single multipart request. Since we don't detect that we
          need a new revision until after the document has been serialized we need
          to be able to deserialize the body so that we can generate the same
          revisions regardless of the contents of the database. If we don't do
          this then we end up including information from the position of the
          attachment on disk in the revision calculation which can introduce
          branches in the revision tree.

          I've left this as a separate commit from the pluggable storage engine
          work so that its called out clearly for us to revisit.

          COUCHDB-3255

          Show
          jira-bot ASF subversion and git services added a comment - Commit 4b4238718c0a2dbf02cc00f6a855ff8ff8d5cd59 in couchdb-couch's branch refs/heads/ COUCHDB-3287 -pluggable-storage-engines from Paul Joseph Davis [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=4b42387 ] Ensure deterministic revisions for attachments This re-fixes a corner case when recreating a document with an attachment in a single multipart request. Since we don't detect that we need a new revision until after the document has been serialized we need to be able to deserialize the body so that we can generate the same revisions regardless of the contents of the database. If we don't do this then we end up including information from the position of the attachment on disk in the revision calculation which can introduce branches in the revision tree. I've left this as a separate commit from the pluggable storage engine work so that its called out clearly for us to revisit. COUCHDB-3255
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 81d6960afe542747c27c5b302743c2955e553ec1 in couchdb's branch refs/heads/COUCHDB-3287-pluggable-storage-engines from Paul Joseph Davis
          [ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=81d6960 ]

          Ensure deterministic revisions for attachments

          This re-fixes a corner case when recreating a document with an
          attachment in a single multipart request. Since we don't detect that we
          need a new revision until after the document has been serialized we need
          to be able to deserialize the body so that we can generate the same
          revisions regardless of the contents of the database. If we don't do
          this then we end up including information from the position of the
          attachment on disk in the revision calculation which can introduce
          branches in the revision tree.

          I've left this as a separate commit from the pluggable storage engine
          work so that its called out clearly for us to revisit.

          COUCHDB-3255

          Show
          jira-bot ASF subversion and git services added a comment - Commit 81d6960afe542747c27c5b302743c2955e553ec1 in couchdb's branch refs/heads/ COUCHDB-3287 -pluggable-storage-engines from Paul Joseph Davis [ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=81d6960 ] Ensure deterministic revisions for attachments This re-fixes a corner case when recreating a document with an attachment in a single multipart request. Since we don't detect that we need a new revision until after the document has been serialized we need to be able to deserialize the body so that we can generate the same revisions regardless of the contents of the database. If we don't do this then we end up including information from the position of the attachment on disk in the revision calculation which can introduce branches in the revision tree. I've left this as a separate commit from the pluggable storage engine work so that its called out clearly for us to revisit. COUCHDB-3255
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit c340fb0805ecae7aa4b5aaf9a22120ba383cd505 in couchdb's branch refs/heads/COUCHDB-3287-pluggable-storage-engines from Paul Joseph Davis
          [ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=c340fb0 ]

          Ensure deterministic revisions for attachments

          This re-fixes a corner case when recreating a document with an
          attachment in a single multipart request. Since we don't detect that we
          need a new revision until after the document has been serialized we need
          to be able to deserialize the body so that we can generate the same
          revisions regardless of the contents of the database. If we don't do
          this then we end up including information from the position of the
          attachment on disk in the revision calculation which can introduce
          branches in the revision tree.

          I've left this as a separate commit from the pluggable storage engine
          work so that its called out clearly for us to revisit.

          COUCHDB-3255

          Show
          jira-bot ASF subversion and git services added a comment - Commit c340fb0805ecae7aa4b5aaf9a22120ba383cd505 in couchdb's branch refs/heads/ COUCHDB-3287 -pluggable-storage-engines from Paul Joseph Davis [ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=c340fb0 ] Ensure deterministic revisions for attachments This re-fixes a corner case when recreating a document with an attachment in a single multipart request. Since we don't detect that we need a new revision until after the document has been serialized we need to be able to deserialize the body so that we can generate the same revisions regardless of the contents of the database. If we don't do this then we end up including information from the position of the attachment on disk in the revision calculation which can introduce branches in the revision tree. I've left this as a separate commit from the pluggable storage engine work so that its called out clearly for us to revisit. COUCHDB-3255
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 3fc4c98c27285da92b62a72189b5934bc820b3f3 in couchdb's branch refs/heads/COUCHDB-3287-pluggable-storage-engines from Paul Joseph Davis
          [ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=3fc4c98 ]

          Ensure deterministic revisions for attachments

          This re-fixes a corner case when recreating a document with an
          attachment in a single multipart request. Since we don't detect that we
          need a new revision until after the document has been serialized we need
          to be able to deserialize the body so that we can generate the same
          revisions regardless of the contents of the database. If we don't do
          this then we end up including information from the position of the
          attachment on disk in the revision calculation which can introduce
          branches in the revision tree.

          I've left this as a separate commit from the pluggable storage engine
          work so that its called out clearly for us to revisit.

          COUCHDB-3255

          Show
          jira-bot ASF subversion and git services added a comment - Commit 3fc4c98c27285da92b62a72189b5934bc820b3f3 in couchdb's branch refs/heads/ COUCHDB-3287 -pluggable-storage-engines from Paul Joseph Davis [ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=3fc4c98 ] Ensure deterministic revisions for attachments This re-fixes a corner case when recreating a document with an attachment in a single multipart request. Since we don't detect that we need a new revision until after the document has been serialized we need to be able to deserialize the body so that we can generate the same revisions regardless of the contents of the database. If we don't do this then we end up including information from the position of the attachment on disk in the revision calculation which can introduce branches in the revision tree. I've left this as a separate commit from the pluggable storage engine work so that its called out clearly for us to revisit. COUCHDB-3255
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 90bb69e572d94f74fac5e79d7dff21e09ccf6c1c in couchdb's branch refs/heads/COUCHDB-3287-pluggable-storage-engines from Paul Joseph Davis
          [ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=90bb69e ]

          Ensure deterministic revisions for attachments

          This re-fixes a corner case when recreating a document with an
          attachment in a single multipart request. Since we don't detect that we
          need a new revision until after the document has been serialized we need
          to be able to deserialize the body so that we can generate the same
          revisions regardless of the contents of the database. If we don't do
          this then we end up including information from the position of the
          attachment on disk in the revision calculation which can introduce
          branches in the revision tree.

          I've left this as a separate commit from the pluggable storage engine
          work so that its called out clearly for us to revisit.

          COUCHDB-3255

          Show
          jira-bot ASF subversion and git services added a comment - Commit 90bb69e572d94f74fac5e79d7dff21e09ccf6c1c in couchdb's branch refs/heads/ COUCHDB-3287 -pluggable-storage-engines from Paul Joseph Davis [ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=90bb69e ] Ensure deterministic revisions for attachments This re-fixes a corner case when recreating a document with an attachment in a single multipart request. Since we don't detect that we need a new revision until after the document has been serialized we need to be able to deserialize the body so that we can generate the same revisions regardless of the contents of the database. If we don't do this then we end up including information from the position of the attachment on disk in the revision calculation which can introduce branches in the revision tree. I've left this as a separate commit from the pluggable storage engine work so that its called out clearly for us to revisit. COUCHDB-3255
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 6a13d64f7e8578fba2059b1d15b11378abe9a5c1 in couchdb's branch refs/heads/COUCHDB-3287-pluggable-storage-engines from Paul Joseph Davis
          [ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=6a13d64 ]

          Ensure deterministic revisions for attachments

          This re-fixes a corner case when recreating a document with an
          attachment in a single multipart request. Since we don't detect that we
          need a new revision until after the document has been serialized we need
          to be able to deserialize the body so that we can generate the same
          revisions regardless of the contents of the database. If we don't do
          this then we end up including information from the position of the
          attachment on disk in the revision calculation which can introduce
          branches in the revision tree.

          I've left this as a separate commit from the pluggable storage engine
          work so that its called out clearly for us to revisit.

          COUCHDB-3255

          Show
          jira-bot ASF subversion and git services added a comment - Commit 6a13d64f7e8578fba2059b1d15b11378abe9a5c1 in couchdb's branch refs/heads/ COUCHDB-3287 -pluggable-storage-engines from Paul Joseph Davis [ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=6a13d64 ] Ensure deterministic revisions for attachments This re-fixes a corner case when recreating a document with an attachment in a single multipart request. Since we don't detect that we need a new revision until after the document has been serialized we need to be able to deserialize the body so that we can generate the same revisions regardless of the contents of the database. If we don't do this then we end up including information from the position of the attachment on disk in the revision calculation which can introduce branches in the revision tree. I've left this as a separate commit from the pluggable storage engine work so that its called out clearly for us to revisit. COUCHDB-3255
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 6375cd41afed07818ff77713fcab7f7e72e5040c in couchdb's branch refs/heads/COUCHDB-3287-pluggable-storage-engines from Paul Joseph Davis
          [ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=6375cd4 ]

          Ensure deterministic revisions for attachments

          This re-fixes a corner case when recreating a document with an
          attachment in a single multipart request. Since we don't detect that we
          need a new revision until after the document has been serialized we need
          to be able to deserialize the body so that we can generate the same
          revisions regardless of the contents of the database. If we don't do
          this then we end up including information from the position of the
          attachment on disk in the revision calculation which can introduce
          branches in the revision tree.

          I've left this as a separate commit from the pluggable storage engine
          work so that its called out clearly for us to revisit.

          COUCHDB-3255

          Show
          jira-bot ASF subversion and git services added a comment - Commit 6375cd41afed07818ff77713fcab7f7e72e5040c in couchdb's branch refs/heads/ COUCHDB-3287 -pluggable-storage-engines from Paul Joseph Davis [ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=6375cd4 ] Ensure deterministic revisions for attachments This re-fixes a corner case when recreating a document with an attachment in a single multipart request. Since we don't detect that we need a new revision until after the document has been serialized we need to be able to deserialize the body so that we can generate the same revisions regardless of the contents of the database. If we don't do this then we end up including information from the position of the attachment on disk in the revision calculation which can introduce branches in the revision tree. I've left this as a separate commit from the pluggable storage engine work so that its called out clearly for us to revisit. COUCHDB-3255
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1bb435e08b4f32bfcb3a1cbc5e424ee5927bfa1a in couchdb's branch refs/heads/COUCHDB-3287-pluggable-storage-engines from Paul Joseph Davis
          [ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=1bb435e ]

          Ensure deterministic revisions for attachments

          This re-fixes a corner case when recreating a document with an
          attachment in a single multipart request. Since we don't detect that we
          need a new revision until after the document has been serialized we need
          to be able to deserialize the body so that we can generate the same
          revisions regardless of the contents of the database. If we don't do
          this then we end up including information from the position of the
          attachment on disk in the revision calculation which can introduce
          branches in the revision tree.

          I've left this as a separate commit from the pluggable storage engine
          work so that its called out clearly for us to revisit.

          COUCHDB-3255

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1bb435e08b4f32bfcb3a1cbc5e424ee5927bfa1a in couchdb's branch refs/heads/ COUCHDB-3287 -pluggable-storage-engines from Paul Joseph Davis [ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=1bb435e ] Ensure deterministic revisions for attachments This re-fixes a corner case when recreating a document with an attachment in a single multipart request. Since we don't detect that we need a new revision until after the document has been serialized we need to be able to deserialize the body so that we can generate the same revisions regardless of the contents of the database. If we don't do this then we end up including information from the position of the attachment on disk in the revision calculation which can introduce branches in the revision tree. I've left this as a separate commit from the pluggable storage engine work so that its called out clearly for us to revisit. COUCHDB-3255

            People

            • Assignee:
              Unassigned
              Reporter:
              paul.joseph.davis Paul Joseph Davis
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development