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 2022/07/13 18:18:33 UTC

[couchdb] branch main updated: Remove some left-over local endpoint clauses in replicator

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 330703cae Remove some left-over local endpoint clauses in replicator
330703cae is described below

commit 330703cae358e1e2bbc9303061193ed0edc9fb3e
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Wed Jul 13 11:05:10 2022 -0400

    Remove some left-over local endpoint clauses in replicator
    
    We removed local endpoints a while back and these were left over.
    
    Also remove some unused headers as discovered by erlang_ls and emacs.
---
 src/couch_replicator/src/couch_replicator_api_wrap.erl       | 6 +-----
 src/couch_replicator/src/couch_replicator_changes_reader.erl | 6 ------
 src/couch_replicator/src/couch_replicator_worker.erl         | 1 -
 3 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/src/couch_replicator/src/couch_replicator_api_wrap.erl b/src/couch_replicator/src/couch_replicator_api_wrap.erl
index 193f8dad4..7d34ff053 100644
--- a/src/couch_replicator/src/couch_replicator_api_wrap.erl
+++ b/src/couch_replicator/src/couch_replicator_api_wrap.erl
@@ -58,11 +58,7 @@
 -define(MIN_URL_LEN, 200).
 
 db_uri(#httpdb{url = Url}) ->
-    couch_util:url_strip_password(Url);
-db_uri(DbName) when is_binary(DbName) ->
-    ?b2l(DbName);
-db_uri(Db) ->
-    db_uri(couch_db:name(Db)).
+    couch_util:url_strip_password(Url).
 
 db_open(Db) ->
     db_open(Db, false, []).
diff --git a/src/couch_replicator/src/couch_replicator_changes_reader.erl b/src/couch_replicator/src/couch_replicator_changes_reader.erl
index 9f8473200..7fa8c26c2 100644
--- a/src/couch_replicator/src/couch_replicator_changes_reader.erl
+++ b/src/couch_replicator/src/couch_replicator_changes_reader.erl
@@ -38,12 +38,6 @@ start_link(StartSeq, #httpdb{} = Db, ChangesQueue, Options) ->
                 ChangesQueue,
                 Options
             )
-        end)};
-start_link(StartSeq, Db, ChangesQueue, Options) ->
-    Parent = self(),
-    {ok,
-        spawn_link(fun() ->
-            ?MODULE:read_changes(Parent, StartSeq, Db, ChangesQueue, Options)
         end)}.
 
 read_changes(Parent, StartSeq, Db, ChangesQueue, Options) ->
diff --git a/src/couch_replicator/src/couch_replicator_worker.erl b/src/couch_replicator/src/couch_replicator_worker.erl
index f66a019e2..233de6dd3 100644
--- a/src/couch_replicator/src/couch_replicator_worker.erl
+++ b/src/couch_replicator/src/couch_replicator_worker.erl
@@ -24,7 +24,6 @@
 
 -include_lib("couch/include/couch_db.hrl").
 -include_lib("couch_replicator/include/couch_replicator_api_wrap.hrl").
--include("couch_replicator.hrl").
 
 % TODO: maybe make both buffer max sizes configurable