apache / apache/pouchdb

Duplicate attachments for doc update (& putAttachment)

Open
#3,234 23 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
17.6k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

Hello,

CouchDB has implemented a way not to duplicate existing attachments when we update a doc (https://issues.apache.org/jira/browse/COUCHDB-62). By using pouch.put() it duplicates these attachments and therefore exponentially increases DB size!

A way to verify that is to create a doc with a string value and a big attachment. Update the string and you'll see your couchdb will double in size.

BTW, adding an additional attachment should not duplicate existing ones either...

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.