Skip to content

Instantly share code, notes, and snippets.

@davisp
davisp / repro.js
Created October 4, 2016 14:32
Reproducer for COUCHDB-3173
["reset", {"reduce_limit":"true", "timeout":5000}]
["add_fun", "function(doc){if(doc.type===\"foo\")emit(doc._id,doc);}"]
["map_doc", {"_id":"foo2","_rev":"1-d7da3cd352ef74f6391cc13601081214","type":"foo","value":"😄"}]
% Licensed under the Apache License, Version 2.0 (the "License"); you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% http://www.apache.org/licenses/LICENSE-2.0
%
% Unless required by applicable law or agreed to in writing, software
% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
% License for the specific language governing permissions and limitations under
% Licensed under the Apache License, Version 2.0 (the "License"); you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% http://www.apache.org/licenses/LICENSE-2.0
%
% Unless required by applicable law or agreed to in writing, software
% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
% License for the specific language governing permissions and limitations under
upgrade_mrargs(#mrargs{} = Args) ->
Args;
upgrade_mrargs({mrargs,
ViewType,
Reduce,
PreflightFun,
StartKey,
StartKeyDocId,
import copy
import re
import simplejson
__all__ = ["jsondiff", "jsonapply"]
def jsondiff(left, right, stream=None):
if stream is None:
stream = sys.stdout
flushed = 0
==> couch_mrview (eunit)
Compiled src/couch_mrview_compactor.erl
Compiled src/couch_mrview_test_util.erl
Compiled src/couch_mrview.erl
Compiled src/couch_mrview_changes.erl
Compiled src/couch_mrview_http.erl
Compiled src/couch_mrview_update_notifier.erl
Compiled src/couch_mrview_cleanup.erl
Compiled src/couch_mrview_updater.erl
Compiled src/couch_mrview_show.erl
(fun() ->
SizePids = lists:flatmap(fun(Pid) ->
Size = case process_info(Pid, binary) of
{binary, BinInfos} ->
lists:sum([S || {_, S, _} <- BinInfos]);
undefined ->
0
end,
if Size == 0 -> []; true ->
[{Size, Pid}]
#!/bin/bash -e
rm -rf couchdb
git clone https://github.com/apache/couchdb.git
cd couchdb
echo ""
add_subtree () {
name=$1
commit 6bfc236edea2ac9e285517056dabeaf67f7cd7f7
Author: Paul J. Davis <[email protected]>
Date: Wed Feb 15 11:46:31 2017 -0600
Fix rebar configuration after repository merge
diff --git a/rebar.config.script b/rebar.config.script
index 85d5c94fc..9770a3f6c 100644
--- a/rebar.config.script
+++ b/rebar.config.script
src/test_util.erl:234: in test_util:fake_db/1[234-243]:Function fake_db/1 will never be called
src/test_util.erl:0: in test_util:fake_db/1[234-243]:The created fun has no local return