{"action":"created","issue":{"url":"https://api.github.com/repos/apache/couchdb-couch/issues/24","labels_url":"https://api.github.com/repos/apache/couchdb-couch/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/apache/couchdb-couch/issues/24/comments","events_url":"https://api.github.com/repos/apache/couchdb-couch/issues/24/events","html_url":"https://github.com/apache/couchdb-couch/pull/24","id":52030452,"number":24,"title":"2516 deduplicate attachements on compaction","user":{"login":"iilyak","id":9804420,"avatar_url":"https://avatars.githubusercontent.com/u/9804420?v=3","gravatar_id":"","url":"https://api.github.com/users/iilyak","html_url":"https://github.com/iilyak","followers_url":"https://api.github.com/users/iilyak/followers","following_url":"https://api.github.com/users/iilyak/following{/other_user}","gists_url":"https://api.github.com/users/iilyak/gists{/gist_id}","starred_url":"https://api.github.com/users/iilyak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iilyak/subscriptions","organizations_url":"https://api.github.com/users/iilyak/orgs","repos_url":"https://api.github.com/users/iilyak/repos","events_url":"https://api.github.com/users/iilyak/events{/privacy}","received_events_url":"https://api.github.com/users/iilyak/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-12-15T19:51:40Z","updated_at":"2015-01-07T19:33:50Z","closed_at":"2015-01-07T18:33:19Z","pull_request":{"url":"https://api.github.com/repos/apache/couchdb-couch/pulls/24","html_url":"https://github.com/apache/couchdb-couch/pull/24","diff_url":"https://github.com/apache/couchdb-couch/pull/24.diff","patch_url":"https://github.com/apache/couchdb-couch/pull/24.patch"},"body":"This is replacing PR https://github.com/apache/couchdb-couch/pull/22"},"comment":{"url":"https://api.github.com/repos/apache/couchdb-couch/issues/comments/69077741","html_url":"https://github.com/apache/couchdb-couch/pull/24#issuecomment-69077741","issue_url":"https://api.github.com/repos/apache/couchdb-couch/issues/24","id":69077741,"user":{"login":"davisp","id":19929,"avatar_url":"https://avatars.githubusercontent.com/u/19929?v=3","gravatar_id":"","url":"https://api.github.com/users/davisp","html_url":"https://github.com/davisp","followers_url":"https://api.github.com/users/davisp/followers","following_url":"https://api.github.com/users/davisp/following{/other_user}","gists_url":"https://api.github.com/users/davisp/gists{/gist_id}","starred_url":"https://api.github.com/users/davisp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davisp/subscriptions","organizations_url":"https://api.github.com/users/davisp/orgs","repos_url":"https://api.github.com/users/davisp/repos","events_url":"https://api.github.com/users/davisp/events{/privacy}","received_events_url":"https://api.github.com/users/davisp/received_events","type":"User","site_admin":false},"created_at":"2015-01-07T19:33:50Z","updated_at":"2015-01-07T19:33:50Z","body":"For posterity, we were trying to make this work without requiring an on-disk format change but sadly that appears to not be possible due to the lack of information available when updating documents. Given the lack of information we can't tell if an attachment that's being updated or deleted needs to be counted in active_size.\r\n\r\nThe proper fix for this will be to add a new index to each database that contains the attachment data. Given the merge work we're going to delay this until later. Also if/when we get back to this we'll also want to investigate having attachment data stored in a separate file which would remove a lot of the gymnastics we have around couch_file:make_blocks and friends."}}