[ 
https://issues.apache.org/jira/browse/COUCHDB-769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14956795#comment-14956795
 ] 

ASF GitHub Bot commented on COUCHDB-769:
----------------------------------------

Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-chttpd/pull/82#discussion_r41985231
  
    --- Diff: src/chttpd_db.erl ---
    @@ -1127,12 +1155,20 @@ 
db_attachment_req(#httpd{method='GET',mochi_req=MochiReq}=Req, Db, DocId, FileNa
                 % header we'll fall back to a chunked response.
                 undefined
             end,
    -        AttFun = case ReqAcceptsAttEnc of
    +        AttFunTmp = case ReqAcceptsAttEnc of
             false ->
                 fun couch_att:foldl_decode/3;
             true ->
                 fun couch_att:foldl/3
             end,
    +        case AttExternal of
    +            "external" ->
    +                AttFun = couch_att:fetch(data,Att),
    +                couch_log:debug("chtttpd_db: Got new attachment ",[]);
    +            _ ->
    +                couch_log:debug("chttpd_db: not external att",[]),
    +                AttFun = AttFunTmp
    --- End diff --
    
    So, AttFun could be actually an attachment data or some fold function? 
Something went wrong if you have to do this.


> Store large attachments external to the .couch file
> ---------------------------------------------------
>
>                 Key: COUCHDB-769
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-769
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Database Core
>            Reporter: Robert Newson
>            Assignee: Adam Kocoloski
>         Attachments: external_attachments_alpha.patch
>
>
> For attachment-heavy applications storing the attachments in separate files 
> significantly eases compaction problems.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to