Remove obsoleted R14-era code
We no longer support R14 so we're dropping R14-specific complications
in the codebase.
COUCHDB-2975
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 @@
%% 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;
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 @@
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
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 @@
[]
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