CouchDB
  1. CouchDB
  2. COUCHDB-1177

function_clause error in write_streamed_attachment

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.0.1, 1.0.2
    • Fix Version/s: 1.0.3, 1.1, 1.2
    • Component/s: None
    • Labels:
      None
    • Skill Level:
      Committers Level (Medium to Hard)

      Description

      LenLeft can still go negative. While the guard clause prevents an earlier bug, replication fails when it hits this issue.

      In the following case, LenLeft is -673327 which matches no clauses (we expect either 0 or > 0). Somehow we are starting with a LenLeft value lower than the number of bytes we subsequently receive.

      {function_clause,
      [

      {couch_db,write_streamed_attachment, [<0.13520.3>, #Fun<couch_rep_att.0.90652905>,-673327]}

      ,

      {couch_db,with_stream,3}

      ,

      {couch_db,'-doc_flush_atts/2-lc$^0/1-0-',2}

      ,

      {couch_db,doc_flush_atts,2}

      ,

      {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}

      ]}}

        Activity

          People

          • Assignee:
            Robert Newson
            Reporter:
            Robert Newson
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development