You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2017/07/28 18:11:52 UTC

[couchdb] branch master updated (19bd99a -> 04f749c)

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

vatamane pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


    from 19bd99a  bump docs dependency
     new 058e674  Do not unconditioanlly retry a request which was closed unexpectedly
     new 04f749c  Disable flaky 413 replication test

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:
 .../src/couch_replicator_httpc.erl                 |  6 ++--
 ...ch_replicator_small_max_request_size_target.erl | 33 +++++++++++++---------
 2 files changed, 23 insertions(+), 16 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <co...@couchdb.apache.org>'].

[couchdb] 02/02: Disable flaky 413 replication test

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

vatamane pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 04f749cd8fce8da13cd64d22c6b7335d550bc9d0
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Fri Jul 28 06:37:48 2017 +0000

    Disable flaky 413 replication test
    
    It is possible that sometimes a multipart/related PUT with a doc and
    an attachment would fail with the connection being un-expectedly
    closed before the client (ibrowse) gets to parse the 413 error
    response.
    
    That makes the test flaky so it is disabled for now.
    
    Issue #574
---
 ...ch_replicator_small_max_request_size_target.erl | 33 +++++++++++++---------
 1 file changed, 19 insertions(+), 14 deletions(-)

diff --git a/src/couch_replicator/test/couch_replicator_small_max_request_size_target.erl b/src/couch_replicator/test/couch_replicator_small_max_request_size_target.erl
index b0b867a..6f3308c 100644
--- a/src/couch_replicator/test/couch_replicator_small_max_request_size_target.erl
+++ b/src/couch_replicator/test/couch_replicator_small_max_request_size_target.erl
@@ -57,8 +57,12 @@ reduce_max_request_size_test_() ->
              || Pair <- Pairs]
             ++ [{Pair, fun should_replicate_one/2}
              || Pair <- Pairs]
-            ++ [{Pair, fun should_replicate_one_with_attachment/2}
-             || Pair <- Pairs]
+            % Disabled. See issue 574. Sometimes PUTs with a doc and
+            % attachment which exceed maximum request size are simply
+            % closed instead of returning a 413 request. That makes these
+            % tests flaky.
+            % ++ [{Pair, fun should_replicate_one_with_attachment/2}
+            %  || Pair <- Pairs]
         }
     }.
 
@@ -85,12 +89,13 @@ should_replicate_one({From, To}, {_Ctx, {Source, Target}}) ->
 % If a document has an attachment > 64 * 1024 bytes, replicator will switch to
 % POST-ing individual documents directly and skip bulk_docs. Test that case
 % separately
-should_replicate_one_with_attachment({From, To}, {_Ctx, {Source, Target}}) ->
-    {lists:flatten(io_lib:format("~p -> ~p", [From, To])),
-     {inorder, [should_populate_source_one_large_attachment(Source),
-                should_populate_source(Source),
-                should_replicate(Source, Target),
-                should_compare_databases(Source, Target, [<<"doc0">>])]}}.
+% See note in main test function why this was disabled.
+% should_replicate_one_with_attachment({From, To}, {_Ctx, {Source, Target}}) ->
+%    {lists:flatten(io_lib:format("~p -> ~p", [From, To])),
+%     {inorder, [should_populate_source_one_large_attachment(Source),
+%                should_populate_source(Source),
+%                should_replicate(Source, Target),
+%                should_compare_databases(Source, Target, [<<"doc0">>])]}}.
 
 
 should_populate_source({remote, Source}) ->
@@ -107,11 +112,11 @@ should_populate_source_one_large_one_small(Source) ->
     {timeout, ?TIMEOUT_EUNIT, ?_test(one_large_one_small(Source, 12000, 3000))}.
 
 
-should_populate_source_one_large_attachment({remote, Source}) ->
-    should_populate_source_one_large_attachment(Source);
+% should_populate_source_one_large_attachment({remote, Source}) ->
+%    should_populate_source_one_large_attachment(Source);
 
-should_populate_source_one_large_attachment(Source) ->
-    {timeout, ?TIMEOUT_EUNIT, ?_test(one_large_attachment(Source, 70000, 70000))}.
+% should_populate_source_one_large_attachment(Source) ->
+%   {timeout, ?TIMEOUT_EUNIT, ?_test(one_large_attachment(Source, 70000, 70000))}.
 
 
 should_replicate({remote, Source}, Target) ->
@@ -151,8 +156,8 @@ one_large_one_small(DbName, Large, Small) ->
     add_doc(DbName, <<"doc1">>, Small, 0).
 
 
-one_large_attachment(DbName, Size, AttSize) ->
-    add_doc(DbName, <<"doc0">>, Size, AttSize).
+% one_large_attachment(DbName, Size, AttSize) ->
+%    add_doc(DbName, <<"doc0">>, Size, AttSize).
 
 
 add_doc(DbName, DocId, Size, AttSize) when is_binary(DocId) ->

-- 
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.

[couchdb] 01/02: Do not unconditioanlly retry a request which was closed unexpectedly

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

vatamane pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 058e674bd202cfc8ddbb981c48060fd8bc5c2001
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Fri Jul 28 04:52:12 2017 +0000

    Do not unconditioanlly retry a request which was closed unexpectedly
    
    In some case such as when replicator flushes a document received from an
    open_revs response, it explictly sets the number of retries to 0 because
    the context for that request might not be restartable and the retry should
    happen at a higher level.
    
    Issue #574
---
 src/couch_replicator/src/couch_replicator_httpc.erl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/couch_replicator/src/couch_replicator_httpc.erl b/src/couch_replicator/src/couch_replicator_httpc.erl
index 58fb0e1..d3c6b01 100644
--- a/src/couch_replicator/src/couch_replicator_httpc.erl
+++ b/src/couch_replicator/src/couch_replicator_httpc.erl
@@ -128,8 +128,10 @@ stop_and_release_worker(Pool, Worker) ->
     end,
     ok = couch_replicator_httpc_pool:release_worker_sync(Pool, Worker).
 
-process_response({error, sel_conn_closed}, _Worker, HttpDb, Params, _Cb) ->
-    throw({retry, HttpDb, Params});
+process_response({error, sel_conn_closed}, Worker, HttpDb, Params, _Cb) ->
+    stop_and_release_worker(HttpDb#httpdb.httpc_pool, Worker),
+    maybe_retry(sel_conn_closed, Worker, HttpDb, Params);
+
 
 %% This clause handles un-expected connection closing during pipelined requests.
 %% For example, if server responds to a request, sets Connection: close header

-- 
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.