You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2017/11/16 20:56:08 UTC

[GitHub] starting commented on issue #1001: [1.6.x][Compaction] Random compaction failures

starting commented on issue #1001: [1.6.x][Compaction] Random compaction failures
URL: https://github.com/apache/couchdb/issues/1001#issuecomment-345059672
 
 
   Following code is to avoid compaction failure when document not found in the db but only in index. 
   `
   diff --git a/src/couchdb/couch_db_updater.erl b/src/couchdb/couch_db_updater.erl
   index c92097f62..4a783aad0 100644
   --- a/src/couchdb/couch_db_updater.erl
   +++ b/src/couchdb/couch_db_updater.erl
   @@ -884,7 +884,10 @@ copy_docs(Db, #db{updater_fd = DestFd} = NewDb, InfoBySeq0, Retry) ->
                            fun({_, _, _, AttLen, _, _, _, _}, S) -> S + AttLen end,
                            SummarySize, AttsInfo),
                        {IsDel, Pos, Seq, TotalLeafSize}
   -                end, RevTree)}
   +                end, RevTree)};
   +        (U) ->
   +             ?LOG_INFO("Drop a document from compaction: not found in db : ~p", [U]),
   +            []
            end, LookupResults),
   
        NewFullDocInfos = stem_full_doc_infos(Db, NewFullDocInfos1),
   `

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services