You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Filipe Manana (Created) (JIRA)" <ji...@apache.org> on 2011/12/16 16:00:32 UTC

[jira] [Created] (COUCHDB-1365) Fix merging of document with attachment stubs

Fix merging of document with attachment stubs
---------------------------------------------

                 Key: COUCHDB-1365
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1365
             Project: CouchDB
          Issue Type: Bug
          Components: Database Core, Replication
            Reporter: Filipe Manana
            Priority: Blocker
             Fix For: 1.2, 1.1.2
         Attachments: 0001-Fix-merging-of-documents-with-attachment-stubs.patch, reproduce-CBMA-22.sh

This issue was found by Marty Schoch and is reproducible the following attached script.

The commit message in the patch explains the issue:

"During replicated updates, merging of documents with
attachment stubs will fail if, after merging the received
document's revision tree with the current on disk revision
tree, produces a revision tree which doesn't contain the revision
that immediately precedes the received document's revision.

This happens when the received document doesn't contain in its
revision history any of the revisions in the revision tree
of the currently on disk document. This is possible when the
document had a number of updates higher than the value of revs
limit defined for the source database."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (COUCHDB-1365) Fix merging of document with attachment stubs

Posted by "Filipe Manana (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filipe Manana updated COUCHDB-1365:
-----------------------------------

    Attachment: reproduce-CBMA-22.sh
                0001-Fix-merging-of-documents-with-attachment-stubs.patch
    
> Fix merging of document with attachment stubs
> ---------------------------------------------
>
>                 Key: COUCHDB-1365
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1365
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core, Replication
>            Reporter: Filipe Manana
>            Priority: Blocker
>             Fix For: 1.2, 1.1.2
>
>         Attachments: 0001-Fix-merging-of-documents-with-attachment-stubs.patch, reproduce-CBMA-22.sh
>
>
> This issue was found by Marty Schoch and is reproducible the following attached script.
> The commit message in the patch explains the issue:
> "During replicated updates, merging of documents with
> attachment stubs will fail if, after merging the received
> document's revision tree with the current on disk revision
> tree, produces a revision tree which doesn't contain the revision
> that immediately precedes the received document's revision.
> This happens when the received document doesn't contain in its
> revision history any of the revisions in the revision tree
> of the currently on disk document. This is possible when the
> document had a number of updates higher than the value of revs
> limit defined for the source database."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1365) Fix merging of document with attachment stubs

Posted by "Paul Joseph Davis (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13171039#comment-13171039 ] 

Paul Joseph Davis commented on COUCHDB-1365:
--------------------------------------------

Ah. Sounds good to me then.
                
> Fix merging of document with attachment stubs
> ---------------------------------------------
>
>                 Key: COUCHDB-1365
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1365
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core, Replication
>            Reporter: Filipe Manana
>            Priority: Blocker
>             Fix For: 1.2, 1.1.2
>
>         Attachments: 0001-Fix-merging-of-documents-with-attachment-stubs.patch, reproduce-CBMA-22.sh
>
>
> This issue was found by Marty Schoch and is reproducible the following attached script.
> The commit message in the patch explains the issue:
> "During replicated updates, merging of documents with
> attachment stubs will fail if, after merging the received
> document's revision tree with the current on disk revision
> tree, produces a revision tree which doesn't contain the revision
> that immediately precedes the received document's revision.
> This happens when the received document doesn't contain in its
> revision history any of the revisions in the revision tree
> of the currently on disk document. This is possible when the
> document had a number of updates higher than the value of revs
> limit defined for the source database."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1365) Fix merging of document with attachment stubs

Posted by "Paul Joseph Davis (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13171022#comment-13171022 ] 

Paul Joseph Davis commented on COUCHDB-1365:
--------------------------------------------

I don't get it. Does this patch fix replication or make it fail with an error?
                
> Fix merging of document with attachment stubs
> ---------------------------------------------
>
>                 Key: COUCHDB-1365
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1365
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core, Replication
>            Reporter: Filipe Manana
>            Priority: Blocker
>             Fix For: 1.2, 1.1.2
>
>         Attachments: 0001-Fix-merging-of-documents-with-attachment-stubs.patch, reproduce-CBMA-22.sh
>
>
> This issue was found by Marty Schoch and is reproducible the following attached script.
> The commit message in the patch explains the issue:
> "During replicated updates, merging of documents with
> attachment stubs will fail if, after merging the received
> document's revision tree with the current on disk revision
> tree, produces a revision tree which doesn't contain the revision
> that immediately precedes the received document's revision.
> This happens when the received document doesn't contain in its
> revision history any of the revisions in the revision tree
> of the currently on disk document. This is possible when the
> document had a number of updates higher than the value of revs
> limit defined for the source database."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1365) Fix merging of document with attachment stubs

Posted by "Filipe Manana (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13171032#comment-13171032 ] 

Filipe Manana commented on COUCHDB-1365:
----------------------------------------

Paul, it makes the merging throw a missing_stubs error instead of crashing with a function_clause like this:

{"error":"{worker_died,<0.4681.0>,\n {function_clause,\n [{couch_doc,merge_stubs,\n [{doc,<<\"document\">>,\n {12,\n [<<173,196,77,158,203,221,181,67,212,246,74,43,219,237,94,\n 140>>,\n <<72,74,171,180,242,101,33,172,166,195,136,125,231,134,65,\n 37>>,\n <<83,182,225,95,63,211,178,52,96,92,102,114,130,224,138,145>>,\n <<95,234,29,149,2,72,24,226,188,255,99,148,120,126,85,103>>,\n <<87,169,231,120,244,95,82,97,203,2,50,37,173,50,61,2>>,\n <<215,75,114,100,77,137,213,77,75,174,41,30,112,205,156,95>>,\n <<65,124,138,146,230,4,155,92,52,14,189,152,167,30,231,96>>,\n <<68,16,172,15,172,224,254,189,163,203,141,251,172,187,194,\n 27>>,\n <<34,8,58,215,190,139,123,102,40,55,20,84,179,249,85,8>>,\n <<29,39,81,231,191,249,211,32,50,145,38,97,78,100,102,188>>,\n <<88,5,136,102,228,34,222,205,62,252,107,44,97,23,101,81>>,\n <<222,52,110,92,212,100,161,137,190,163,109,245,255,233,\n 85,71>>]},\n <<131,104,1,108,0,0,0,1,104,2,109,0,0,0,4,110,97,109,101,109,\n 0,0,0,6,99,98,109,97,50,50,106>>,\n [{att,<<\"./reproduce-CBMA-22.sh\">>,<<\"text/plain\">>,41,21,\n <<47,253,88,99,174,109,103,33,178,178,139,137,178,159,\n 243,29>>,\n 2,stub,gzip}],\n false,[]},\n nil]},\n {couch_db,'-prep_and_validate_replicated_updates/5-fun-5-',4},\n {lists,foldl,3},\n {couch_db,prep_and_validate_replicated_updates,5},\n {couch_db,update_docs,4},\n {couch_db,update_doc,4},\n {couch_replicator_worker,flush_doc,2},\n {couch_replicator_worker,local_doc_handler,2}]}}"}

When the replicator catches a missing_stubs error, it retries replicating the document but without incremental attachment replication (sends all attachments, just like in 1.1 and below).
                
> Fix merging of document with attachment stubs
> ---------------------------------------------
>
>                 Key: COUCHDB-1365
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1365
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core, Replication
>            Reporter: Filipe Manana
>            Priority: Blocker
>             Fix For: 1.2, 1.1.2
>
>         Attachments: 0001-Fix-merging-of-documents-with-attachment-stubs.patch, reproduce-CBMA-22.sh
>
>
> This issue was found by Marty Schoch and is reproducible the following attached script.
> The commit message in the patch explains the issue:
> "During replicated updates, merging of documents with
> attachment stubs will fail if, after merging the received
> document's revision tree with the current on disk revision
> tree, produces a revision tree which doesn't contain the revision
> that immediately precedes the received document's revision.
> This happens when the received document doesn't contain in its
> revision history any of the revisions in the revision tree
> of the currently on disk document. This is possible when the
> document had a number of updates higher than the value of revs
> limit defined for the source database."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (COUCHDB-1365) Fix merging of document with attachment stubs

Posted by "Randall Leeds (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13171770#comment-13171770 ] 

Randall Leeds commented on COUCHDB-1365:
----------------------------------------

+1. Mind if I lower the message about refetching in couch_replicator_worker (due to missing_stub) to WARN from ERROR?
                
> Fix merging of document with attachment stubs
> ---------------------------------------------
>
>                 Key: COUCHDB-1365
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1365
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core, Replication
>            Reporter: Filipe Manana
>            Priority: Blocker
>             Fix For: 1.2, 1.1.2
>
>         Attachments: 0001-Fix-merging-of-documents-with-attachment-stubs.patch, 0001-Fix-merging-of-documents-with-attachment-stubs.patch, reproduce-CBMA-22.sh
>
>
> This issue was found by Marty Schoch and is reproducible the following attached script.
> The commit message in the patch explains the issue:
> "During replicated updates, merging of documents with
> attachment stubs will fail if, after merging the received
> document's revision tree with the current on disk revision
> tree, produces a revision tree which doesn't contain the revision
> that immediately precedes the received document's revision.
> This happens when the received document doesn't contain in its
> revision history any of the revisions in the revision tree
> of the currently on disk document. This is possible when the
> document had a number of updates higher than the value of revs
> limit defined for the source database."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1365) Fix merging of document with attachment stubs

Posted by "Randall Leeds (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13171942#comment-13171942 ] 

Randall Leeds commented on COUCHDB-1365:
----------------------------------------

Right. I'm a space cadet. ERROR it is. Ship it.
                
> Fix merging of document with attachment stubs
> ---------------------------------------------
>
>                 Key: COUCHDB-1365
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1365
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core, Replication
>            Reporter: Filipe Manana
>            Priority: Blocker
>             Fix For: 1.2, 1.1.2
>
>         Attachments: 0001-Fix-merging-of-documents-with-attachment-stubs.patch, 0001-Fix-merging-of-documents-with-attachment-stubs.patch, reproduce-CBMA-22.sh
>
>
> This issue was found by Marty Schoch and is reproducible the following attached script.
> The commit message in the patch explains the issue:
> "During replicated updates, merging of documents with
> attachment stubs will fail if, after merging the received
> document's revision tree with the current on disk revision
> tree, produces a revision tree which doesn't contain the revision
> that immediately precedes the received document's revision.
> This happens when the received document doesn't contain in its
> revision history any of the revisions in the revision tree
> of the currently on disk document. This is possible when the
> document had a number of updates higher than the value of revs
> limit defined for the source database."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (COUCHDB-1365) Fix merging of document with attachment stubs

Posted by "Filipe Manana (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filipe Manana updated COUCHDB-1365:
-----------------------------------

    Attachment: 0001-Fix-merging-of-documents-with-attachment-stubs.patch
    
> Fix merging of document with attachment stubs
> ---------------------------------------------
>
>                 Key: COUCHDB-1365
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1365
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core, Replication
>            Reporter: Filipe Manana
>            Priority: Blocker
>             Fix For: 1.2, 1.1.2
>
>         Attachments: 0001-Fix-merging-of-documents-with-attachment-stubs.patch, 0001-Fix-merging-of-documents-with-attachment-stubs.patch, reproduce-CBMA-22.sh
>
>
> This issue was found by Marty Schoch and is reproducible the following attached script.
> The commit message in the patch explains the issue:
> "During replicated updates, merging of documents with
> attachment stubs will fail if, after merging the received
> document's revision tree with the current on disk revision
> tree, produces a revision tree which doesn't contain the revision
> that immediately precedes the received document's revision.
> This happens when the received document doesn't contain in its
> revision history any of the revisions in the revision tree
> of the currently on disk document. This is possible when the
> document had a number of updates higher than the value of revs
> limit defined for the source database."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1365) Fix merging of document with attachment stubs

Posted by "Filipe Manana (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13171042#comment-13171042 ] 

Filipe Manana commented on COUCHDB-1365:
----------------------------------------

Actually the commit message has a small mistake:

"This is possible when the
document had a number of updates higher than the value of revs
limit defined for the source database."

Here I didn't want to say source but target database instead.
                
> Fix merging of document with attachment stubs
> ---------------------------------------------
>
>                 Key: COUCHDB-1365
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1365
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core, Replication
>            Reporter: Filipe Manana
>            Priority: Blocker
>             Fix For: 1.2, 1.1.2
>
>         Attachments: 0001-Fix-merging-of-documents-with-attachment-stubs.patch, 0001-Fix-merging-of-documents-with-attachment-stubs.patch, reproduce-CBMA-22.sh
>
>
> This issue was found by Marty Schoch and is reproducible the following attached script.
> The commit message in the patch explains the issue:
> "During replicated updates, merging of documents with
> attachment stubs will fail if, after merging the received
> document's revision tree with the current on disk revision
> tree, produces a revision tree which doesn't contain the revision
> that immediately precedes the received document's revision.
> This happens when the received document doesn't contain in its
> revision history any of the revisions in the revision tree
> of the currently on disk document. This is possible when the
> document had a number of updates higher than the value of revs
> limit defined for the source database."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1365) Fix merging of document with attachment stubs

Posted by "Filipe Manana (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13171837#comment-13171837 ] 

Filipe Manana commented on COUCHDB-1365:
----------------------------------------

There's no warn log level. Only info, error and debug.
                
> Fix merging of document with attachment stubs
> ---------------------------------------------
>
>                 Key: COUCHDB-1365
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1365
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core, Replication
>            Reporter: Filipe Manana
>            Priority: Blocker
>             Fix For: 1.2, 1.1.2
>
>         Attachments: 0001-Fix-merging-of-documents-with-attachment-stubs.patch, 0001-Fix-merging-of-documents-with-attachment-stubs.patch, reproduce-CBMA-22.sh
>
>
> This issue was found by Marty Schoch and is reproducible the following attached script.
> The commit message in the patch explains the issue:
> "During replicated updates, merging of documents with
> attachment stubs will fail if, after merging the received
> document's revision tree with the current on disk revision
> tree, produces a revision tree which doesn't contain the revision
> that immediately precedes the received document's revision.
> This happens when the received document doesn't contain in its
> revision history any of the revisions in the revision tree
> of the currently on disk document. This is possible when the
> document had a number of updates higher than the value of revs
> limit defined for the source database."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (COUCHDB-1365) Fix merging of document with attachment stubs

Posted by "Filipe Manana (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filipe Manana resolved COUCHDB-1365.
------------------------------------

    Resolution: Fixed
      Assignee: Filipe Manana

Fix applied to master, 1.2.x and 1.1.x branches.
                
> Fix merging of document with attachment stubs
> ---------------------------------------------
>
>                 Key: COUCHDB-1365
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1365
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core, Replication
>            Reporter: Filipe Manana
>            Assignee: Filipe Manana
>            Priority: Blocker
>             Fix For: 1.2, 1.1.2
>
>         Attachments: 0001-Fix-merging-of-documents-with-attachment-stubs.patch, 0001-Fix-merging-of-documents-with-attachment-stubs.patch, reproduce-CBMA-22.sh
>
>
> This issue was found by Marty Schoch and is reproducible the following attached script.
> The commit message in the patch explains the issue:
> "During replicated updates, merging of documents with
> attachment stubs will fail if, after merging the received
> document's revision tree with the current on disk revision
> tree, produces a revision tree which doesn't contain the revision
> that immediately precedes the received document's revision.
> This happens when the received document doesn't contain in its
> revision history any of the revisions in the revision tree
> of the currently on disk document. This is possible when the
> document had a number of updates higher than the value of revs
> limit defined for the source database."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira