You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2019/08/14 15:57:28 UTC

[couchdb] branch jenkins-cpse-debugging updated (e827830 -> c403efb)

This is an automated email from the ASF dual-hosted git repository.

kocolosk pushed a change to branch jenkins-cpse-debugging
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


    from e827830  Upload logs even on success
     new 03b7ef3  Remove debugging in Makefile
     new c403efb  Restore Jenkinsfile and remove src debugging

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Jenkinsfile                                           |  4 +---
 Makefile                                              |  2 --
 src/couch_pse_tests/src/cpse_gather.erl               |  4 ++--
 .../src/cpse_test_purge_replication.erl               | 19 ++-----------------
 src/couch_replicator/src/couch_replicator.erl         |  5 -----
 src/couch_replicator/src/couch_replicator_httpc.erl   |  5 -----
 6 files changed, 5 insertions(+), 34 deletions(-)


[couchdb] 02/02: Restore Jenkinsfile and remove src debugging

Posted by ko...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kocolosk pushed a commit to branch jenkins-cpse-debugging
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit c403efb17e1cce8806e36bae528994a353c7f151
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Wed Aug 14 11:56:19 2019 -0400

    Restore Jenkinsfile and remove src debugging
---
 Jenkinsfile                                           |  4 +---
 src/couch_pse_tests/src/cpse_gather.erl               |  4 ++--
 .../src/cpse_test_purge_replication.erl               | 19 ++-----------------
 src/couch_replicator/src/couch_replicator.erl         |  5 -----
 src/couch_replicator/src/couch_replicator_httpc.erl   |  5 -----
 5 files changed, 5 insertions(+), 32 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index c858f43..342ac6c 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -23,9 +23,7 @@ cd build
 tar -xf ${WORKSPACE}/apache-couchdb-*.tar.gz
 cd apache-couchdb-*
 ./configure --with-curl
-make
-make eunit apps=couch suites=couch_bt_engine_tests || (build-aux/logfile-uploader.py && false)
-build-aux/logfile-uploader.py
+make check || (build-aux/logfile-uploader.py && false)
 '''
 
 make_packages = '''
diff --git a/src/couch_pse_tests/src/cpse_gather.erl b/src/couch_pse_tests/src/cpse_gather.erl
index 61078eb..7804d41 100644
--- a/src/couch_pse_tests/src/cpse_gather.erl
+++ b/src/couch_pse_tests/src/cpse_gather.erl
@@ -80,14 +80,14 @@ make_test_fun(Module, Fun, Arity) ->
     case Arity of
         0 ->
             fun(_) ->
-                {timeout, 180, {Name, fun() ->
+                {timeout, 60, {Name, fun() ->
                     process_flag(trap_exit, true),
                     Module:Fun()
                 end}}
             end;
         1 ->
             fun(Arg) ->
-                {timeout, 180, {Name, fun() ->
+                {timeout, 60, {Name, fun() ->
                     process_flag(trap_exit, true),
                     Module:Fun(Arg)
                 end}}
diff --git a/src/couch_pse_tests/src/cpse_test_purge_replication.erl b/src/couch_pse_tests/src/cpse_test_purge_replication.erl
index 372afa5..20dcc2f 100644
--- a/src/couch_pse_tests/src/cpse_test_purge_replication.erl
+++ b/src/couch_pse_tests/src/cpse_test_purge_replication.erl
@@ -36,12 +36,8 @@ teardown_each({SrcDb, TgtDb}) ->
 
 
 cpse_purge_http_replication({Source, Target}) ->
-    ?debugHere,
-    ?debugVal(mem3:nodes()),
-    ?debugVal([node() | nodes()]),
     {ok, Rev1} = cpse_util:save_doc(Source, {[{'_id', foo}, {vsn, 1}]}),
 
-    ?debugHere,
     cpse_util:assert_db_props(?MODULE, ?LINE, Source, [
         {doc_count, 1},
         {del_doc_count, 0},
@@ -51,16 +47,13 @@ cpse_purge_http_replication({Source, Target}) ->
         {purge_infos, []}
     ]),
 
-    ?debugHere,
     RepObject = {[
         {<<"source">>, db_url(Source)},
         {<<"target">>, db_url(Target)}
     ]},
 
-    ?debugVal(RepObject),
     {ok, _} = couch_replicator:replicate(RepObject, ?ADMIN_USER),
     {ok, Doc1} = cpse_util:open_doc(Target, foo),
-    ?debugHere,
 
     cpse_util:assert_db_props(?MODULE, ?LINE, Target, [
         {doc_count, 1},
@@ -75,7 +68,6 @@ cpse_purge_http_replication({Source, Target}) ->
         {cpse_util:uuid(), <<"foo">>, [Rev1]}
     ],
 
-    ?debugMsg("starting purge"),
     {ok, [{ok, PRevs}]} = cpse_util:purge(Source, PurgeInfos),
     ?assertEqual([Rev1], PRevs),
 
@@ -90,7 +82,6 @@ cpse_purge_http_replication({Source, Target}) ->
 
     % Show that a purge on the source is
     % not replicated to the target
-    ?debugMsg("starting second replication"),
     {ok, _} = couch_replicator:replicate(RepObject, ?ADMIN_USER),
     {ok, Doc2} = cpse_util:open_doc(Target, foo),
     [Rev2] = Doc2#doc_info.revs,
@@ -113,7 +104,6 @@ cpse_purge_http_replication({Source, Target}) ->
         {<<"target">>, db_url(Source)}
     ]},
 
-    ?debugMsg("starting third replication"),
     {ok, _} = couch_replicator:replicate(RepObject2, ?ADMIN_USER),
     {ok, Doc3} = cpse_util:open_doc(Source, foo),
     [Revs3] = Doc3#doc_info.revs,
@@ -217,14 +207,9 @@ db_url(DbName) ->
     Port = mochiweb_socket_server:get(couch_httpd, port),
     Url = ?l2b(io_lib:format("http://~s:~b/~s", [Addr, Port, DbName])),
     test_util:wait(fun() ->
-        ?debugFmt("Trying to get ~s~n", [Url]),
         case test_request:get(?b2l(Url)) of
-            {ok, 200, _, _} ->
-                ?debugMsg("ok"),
-                ok;
-            Else ->
-                ?debugFmt("Failed with ~p~n", [Else]),
-                wait
+            {ok, 200, _, _} -> ok;
+            _ -> wait
         end
     end),
     Url.
diff --git a/src/couch_replicator/src/couch_replicator.erl b/src/couch_replicator/src/couch_replicator.erl
index f08e60b..e4fa31c 100644
--- a/src/couch_replicator/src/couch_replicator.erl
+++ b/src/couch_replicator/src/couch_replicator.erl
@@ -53,7 +53,6 @@
     {error, any()} |
     no_return().
 replicate(PostBody, Ctx) ->
-    couch_log:notice("Received ~p ~p~n", [PostBody, Ctx]),
     {ok, Rep0} = couch_replicator_utils:parse_rep_doc(PostBody, Ctx),
     Rep = Rep0#rep{start_time = os:timestamp()},
     #rep{id = RepId, options = Options, user_ctx = UserCtx} = Rep,
@@ -72,13 +71,9 @@ replicate(PostBody, Ctx) ->
             {error, not_found}
         end;
     false ->
-        couch_log:notice("Checking authorization~n", []),
         check_authorization(RepId, UserCtx),
-        couch_log:notice("Starting listener~n", []),
         {ok, Listener} = rep_result_listener(RepId),
-        couch_log:notice("Starting replication loop~n", []),
         Result = do_replication_loop(Rep),
-        couch_log:notice("Finishing~n", []),
         couch_replicator_notifier:stop(Listener),
         Result
     end.
diff --git a/src/couch_replicator/src/couch_replicator_httpc.erl b/src/couch_replicator/src/couch_replicator_httpc.erl
index 2ec8612..e4cf116 100644
--- a/src/couch_replicator/src/couch_replicator_httpc.erl
+++ b/src/couch_replicator/src/couch_replicator_httpc.erl
@@ -71,23 +71,19 @@ send_req(HttpDb, Params1, Callback) ->
         [{K, ?b2l(iolist_to_binary(V))} || {K, V} <- get_value(qs, Params1, [])]),
     Params = ?replace(Params2, ibrowse_options,
         lists:keysort(1, get_value(ibrowse_options, Params2, []))),
-    couch_log:notice("Sending request ~p ~p~n", [HttpDb, Params]),
     {Worker, Response, HttpDb1} = send_ibrowse_req(HttpDb, Params),
     Ret = try
         process_response(Response, Worker, HttpDb1, Params, Callback)
     catch
         throw:{retry, NewHttpDb0, NewParams0} ->
-            couch_log:notice("Caught retry ~p ~p~n", [NewHttpDb0, NewParams0]),
             {retry, NewHttpDb0, NewParams0}
     after
         Pool = HttpDb1#httpdb.httpc_pool,
         case get(?STOP_HTTP_WORKER) of
             stop ->
-                couch_log:notice("stop_and_release_worker ~p ~p~n", [Pool, Worker]),
                 ok = stop_and_release_worker(Pool, Worker),
                 erase(?STOP_HTTP_WORKER);
             undefined ->
-                couch_log:notice("release_worker ~p ~p~n", [Pool, Worker]),
                 ok = couch_replicator_httpc_pool:release_worker(Pool, Worker)
         end,
         clean_mailbox(Response)
@@ -97,7 +93,6 @@ send_req(HttpDb, Params1, Callback) ->
     % recursive call accidentally.
     case Ret of
         {retry, #httpdb{}=NewHttpDb, NewParams} ->
-            couch_log:notice("sending new req ~p ~p ~p~n", [NewHttpDb, NewParams, Callback]),
             send_req(NewHttpDb, NewParams, Callback);
         _ ->
             Ret


[couchdb] 01/02: Remove debugging in Makefile

Posted by ko...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kocolosk pushed a commit to branch jenkins-cpse-debugging
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 03b7ef36f8cce50ddf19ee1094f564c4d209a988
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Wed Aug 14 11:55:20 2019 -0400

    Remove debugging in Makefile
---
 Makefile | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Makefile b/Makefile
index 8ea161e..f09ae32 100644
--- a/Makefile
+++ b/Makefile
@@ -120,7 +120,6 @@ help:
 .PHONY: couch
 # target: couch - Build CouchDB core, use ERL_OPTS to provide custom compiler's options
 couch: config.erl
-	@echo "CouchDB version is $(COUCHDB_VERSION)"
 	@COUCHDB_VERSION=$(COUCHDB_VERSION) COUCHDB_GIT_SHA=$(COUCHDB_GIT_SHA) $(REBAR) compile $(COMPILE_OPTS)
 	@cp src/couch/priv/couchjs bin/
 
@@ -169,7 +168,6 @@ eunit: export BUILDDIR = $(shell pwd)
 eunit: export ERL_AFLAGS = -config $(shell pwd)/rel/files/eunit.config
 eunit: export COUCHDB_QUERY_SERVER_JAVASCRIPT = $(shell pwd)/bin/couchjs $(shell pwd)/share/server/main.js
 eunit: couch
-	@echo "CouchDB version is $(COUCHDB_VERSION)"
 	@COUCHDB_VERSION=$(COUCHDB_VERSION) COUCHDB_GIT_SHA=$(COUCHDB_GIT_SHA) $(REBAR) setup_eunit 2> /dev/null
 	@for dir in $(subdirs); do \
             tries=0; \