CouchDB
  1. CouchDB
  2. COUCHDB-427

0.9.1 DBs with duplicate attachments can break replication to 0.10+

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Replication
    • Labels:
      None
    • Environment:

      osx, ubuntu, openbsd

    • Skill Level:
      Committers Level (Medium to Hard)

      Description

      When you try to replicate a database from an old version of couchdb to latest, the cpu usage increase up to 100% and more instead of just hanging.

      You can try to replicate from http://benoitc.im/b to latest trunk or 0.9.1 to replicate this issue.

        Activity

        Hide
        Adam Kocoloski added a comment -

        Confirmed that this is still a problem on trunk. I'm attaching the full crash dump, but the key stacktrace is

        [error] [<0.69.0>] ** Generic server <0.69.0> terminating

          • Last message in was {'EXIT',<0.89.0>,
            {{nocatch,
            {bad_request,<<"Duplicate attachments">>}},
            [ {couch_db,check_dup_atts,1}

            ,

            {couch_db,sort_and_check_atts,1}

            ,

            {couch_db,'-update_docs/4-lc$^3/1-3-',2}

            ,

            {couch_db,'-update_docs/4-lc$^2/1-2-',2},
            {couch_db,'-update_docs/4-lc$^2/1-2-',2}

            ,

            {couch_db,update_docs,4}

            ,

            {couch_rep_writer,writer_loop,3}

            ]}}

        Show
        Adam Kocoloski added a comment - Confirmed that this is still a problem on trunk. I'm attaching the full crash dump, but the key stacktrace is [error] [<0.69.0>] ** Generic server <0.69.0> terminating Last message in was {'EXIT',<0.89.0>, {{nocatch, {bad_request,<<"Duplicate attachments">>}}, [ {couch_db,check_dup_atts,1} , {couch_db,sort_and_check_atts,1} , {couch_db,'-update_docs/4-lc$^3/1-3-',2} , {couch_db,'-update_docs/4-lc$^2/1-2-',2}, {couch_db,'-update_docs/4-lc$^2/1-2-',2} , {couch_db,update_docs,4} , {couch_rep_writer,writer_loop,3} ]}}
        Hide
        Adam Kocoloski added a comment -

        So we identified the document that has duplicate attachments as

        http://benoitc.im/b/7cb06e5de28327c7fc81c7028bece5a3

        and indeed it does have three attachments with the same name. I'm not sure what the next step is here. We certainly don't want replication to break, but this seems like such an edge case that I'm not sure it's worth putting in special code in the replicator to deal with it.

        Damien, the check_dup_atts code is your stuff, right? Do you know how Benoit could've ended up with 3 identically-named attachments in the past?

        Show
        Adam Kocoloski added a comment - So we identified the document that has duplicate attachments as http://benoitc.im/b/7cb06e5de28327c7fc81c7028bece5a3 and indeed it does have three attachments with the same name. I'm not sure what the next step is here. We certainly don't want replication to break, but this seems like such an edge case that I'm not sure it's worth putting in special code in the replicator to deal with it. Damien, the check_dup_atts code is your stuff, right? Do you know how Benoit could've ended up with 3 identically-named attachments in the past?

          People

          • Assignee:
            Unassigned
            Reporter:
            Benoit Chesneau
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development