Repository: couchdb-couch-replicator
Updated Branches:
  refs/heads/master 197950631 -> 89d57cd10


Remove obsoleted R14-era code

We no longer support R14 so we're dropping R14-specific complications
in the codebase.

COUCHDB-2975


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/commit/73afc584
Tree: 
http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/73afc584
Diff: 
http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/73afc584

Branch: refs/heads/master
Commit: 73afc584bd10f68626d2049442b5a6058ff002db
Parents: b26c6f0
Author: Robert Newson <rnew...@apache.org>
Authored: Thu Mar 24 11:26:08 2016 +0000
Committer: Robert Newson <rnew...@apache.org>
Committed: Thu Mar 24 12:17:06 2016 +0000

----------------------------------------------------------------------
 src/couch_replicator.erl         |  7 -------
 src/couch_replicator_manager.erl | 26 +-------------------------
 src/couch_replicator_utils.erl   | 14 +++-----------
 3 files changed, 4 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/73afc584/src/couch_replicator.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator.erl b/src/couch_replicator.erl
index b838d17..30cdd29 100644
--- a/src/couch_replicator.erl
+++ b/src/couch_replicator.erl
@@ -151,13 +151,6 @@ async_replicate(#rep{id = {BaseId, Ext}, source = Src, 
target = Tgt} = Rep) ->
             %% the Pid by calling start_child again.
             timer:sleep(50 + random:uniform(100)),
             async_replicate(Rep);
-        {error, {'EXIT', {badarg,
-            [{erlang, apply, [gen_server, start_link, undefined]} | _]}}} ->
-            % Clause to deal with a change in the supervisor module introduced
-            % in R14B02. For more details consult the thread at:
-            %     
http://erlang.org/pipermail/erlang-bugs/2011-March/002273.html
-            _ = supervisor:delete_child(couch_replicator_job_sup, RepChildId),
-            async_replicate(Rep);
         {error, _} = Error ->
             Error
         end;

http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/73afc584/src/couch_replicator_manager.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_manager.erl b/src/couch_replicator_manager.erl
index 1848153..7c254db 100644
--- a/src/couch_replicator_manager.erl
+++ b/src/couch_replicator_manager.erl
@@ -578,31 +578,7 @@ start_replication(Rep, Wait) ->
     end.
 
 replication_complete(DbName, DocId) ->
-    case ets:lookup(?DOC_TO_REP, {DbName, DocId}) of
-    [{{DbName, DocId}, {BaseId, Ext} = RepId}] ->
-        case rep_state(RepId) of
-        nil ->
-            % Prior to OTP R14B02, temporary child specs remain in
-            % in the supervisor after a worker finishes - remove them.
-            % We want to be able to start the same replication but with
-            % eventually different values for parameters that don't
-            % contribute to its ID calculation.
-            case erlang:system_info(otp_release) < "R14B02" of
-            true ->
-                spawn(fun() ->
-                    _ = supervisor:delete_child(couch_replicator_job_sup, 
BaseId ++ Ext)
-                end);
-            false ->
-                ok
-            end;
-        #rep_state{} ->
-            ok
-        end,
-        true = ets:delete(?DOC_TO_REP, {DbName, DocId});
-    _ ->
-        ok
-    end.
-
+    true = ets:delete(?DOC_TO_REP, {DbName, DocId}).
 
 rep_doc_deleted(DbName, DocId) ->
     case ets:lookup(?DOC_TO_REP, {DbName, DocId}) of

http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/73afc584/src/couch_replicator_utils.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_utils.erl b/src/couch_replicator_utils.erl
index c10a4e5..f369408 100644
--- a/src/couch_replicator_utils.erl
+++ b/src/couch_replicator_utils.erl
@@ -367,19 +367,11 @@ ssl_params(Url) ->
         []
     end.
 
-ssl_verify_options(Value) ->
-    ssl_verify_options(Value, erlang:system_info(otp_release)).
-
-ssl_verify_options(true, OTPVersion) when OTPVersion >= "R14" ->
+ssl_verify_options(true) ->
     CAFile = config:get("replicator", "ssl_trusted_certificates_file"),
     [{verify, verify_peer}, {cacertfile, CAFile}];
-ssl_verify_options(false, OTPVersion) when OTPVersion >= "R14" ->
-    [{verify, verify_none}];
-ssl_verify_options(true, _OTPVersion) ->
-    CAFile = config:get("replicator", "ssl_trusted_certificates_file"),
-    [{verify, 2}, {cacertfile, CAFile}];
-ssl_verify_options(false, _OTPVersion) ->
-    [{verify, 0}].
+ssl_verify_options(false) ->
+    [{verify, verify_none}].
 
 
 %% New db record has Options field removed here to enable smoother dbcore 
migration

Reply via email to