Github user rnewson commented on the pull request:
https://github.com/apache/couchdb-couch/pull/24#issuecomment-68453103
Use the md5 digest as a strong hint that we've seen this content before,
but verify for byte identity (read both attachments, compare exhaustively), and
obviously there needs be a unique key (I'm thinking {MD5, Count}, so
{<<"foobar..">>, 0}, {<<"foobar...">>, 1}).
Shorter version: You may only remove duplicate copies of data after you've
compared for true duplication, a digest (even a stronger one than MD5) is not
sufficient.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---