Skip to content

Commit

Permalink
Merge pull request #3271 from apache/couch_att_erroneous_md5_mismatch
Browse files Browse the repository at this point in the history
Couch att erroneous md5 mismatch
  • Loading branch information
rnewson committed Nov 16, 2020
2 parents 0746519 + efcac23 commit 87a6b1a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/couch/src/couch_att.erl
Expand Up @@ -593,13 +593,9 @@ flush_data(Db, {stream, StreamEngine}, Att) ->
% Already written
Att;
false ->
NewAtt = couch_db:with_stream(Db, Att, fun(OutputStream) ->
couch_db:with_stream(Db, Att, fun(OutputStream) ->
couch_stream:copy(StreamEngine, OutputStream)
end),
InMd5 = fetch(md5, Att),
OutMd5 = fetch(md5, NewAtt),
couch_util:check_md5(OutMd5, InMd5),
NewAtt
end)
end.


Expand Down

0 comments on commit 87a6b1a

Please sign in to comment.