[
https://issues.apache.org/jira/browse/COUCHDB-1177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13429302#comment-13429302
]
Jens Alfke commented on COUCHDB-1177:
-------------------------------------
This same exception has been reported against CouchDB 1.2 during a push from
TouchDB.
Here's the TouchDB bug report:
https://github.com/couchbaselabs/TouchDB-iOS/issues/133
and a pastie of the server log including the exception:
http://pastebin.com/QefqXZsN
> function_clause error in write_streamed_attachment
> --------------------------------------------------
>
> Key: COUCHDB-1177
> URL: https://issues.apache.org/jira/browse/COUCHDB-1177
> Project: CouchDB
> Issue Type: Bug
> Affects Versions: 1.0.1, 1.0.2
> Reporter: Robert Newson
> Assignee: Robert Newson
> Priority: Blocker
> Fix For: 1.0.3, 1.1, 1.2
>
>
> 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}]}}
--
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