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/02/08 18:12:03 UTC
[1/2] couch-replicator commit: updated refs/heads/master to 648e465
Repository: couchdb-couch-replicator
Updated Branches:
refs/heads/master 1644696c8 -> 648e465f5
Switch replicator max_document_id_length config to use infinity
Default value switched to be `infinity` instead of 0
COUCHDB-3291
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/46f70c73
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/46f70c73
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/46f70c73
Branch: refs/heads/master
Commit: 46f70c73427e618774872a388287ba682c1376f1
Parents: b18b31c
Author: Nick Vatamaniuc <va...@apache.org>
Authored: Wed Feb 8 11:46:13 2017 -0500
Committer: Nick Vatamaniuc <va...@apache.org>
Committed: Wed Feb 8 11:46:13 2017 -0500
----------------------------------------------------------------------
src/couch_replicator_changes_reader.erl | 9 +++++++--
test/couch_replicator_id_too_long_tests.erl | 2 +-
2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/46f70c73/src/couch_replicator_changes_reader.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_changes_reader.erl b/src/couch_replicator_changes_reader.erl
index f9d9097..439f5c9 100644
--- a/src/couch_replicator_changes_reader.erl
+++ b/src/couch_replicator_changes_reader.erl
@@ -123,5 +123,10 @@ process_change({last_seq, _}, _) ->
ok.
is_doc_id_too_long(IdLength) ->
- ConfigMax = config:get_integer("replicator", "max_document_id_length", 0),
- ConfigMax > 0 andalso IdLength > ConfigMax.
+ case config:get("replicator", "max_document_id_length", "infinity") of
+ "infinity" ->
+ false;
+ ConfigMaxStr ->
+ ConfigMax = list_to_integer(ConfigMaxStr),
+ ConfigMax > 0 andalso IdLength > ConfigMax
+ end.
http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/46f70c73/test/couch_replicator_id_too_long_tests.erl
----------------------------------------------------------------------
diff --git a/test/couch_replicator_id_too_long_tests.erl b/test/couch_replicator_id_too_long_tests.erl
index f5d7165..70eda05 100644
--- a/test/couch_replicator_id_too_long_tests.erl
+++ b/test/couch_replicator_id_too_long_tests.erl
@@ -28,7 +28,7 @@ setup(_) ->
teardown(_, {Ctx, {Source, Target}}) ->
delete_db(Source),
delete_db(Target),
- config:set("replicator", "max_document_id_length", "0"),
+ config:set("replicator", "max_document_id_length", "infinity"),
ok = test_util:stop_couch(Ctx).
[2/2] couch-replicator commit: updated refs/heads/master to 648e465
Posted by va...@apache.org.
Merge branch 'couchdb-3291-use-infinity'
Closes #55
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/648e465f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/648e465f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/648e465f
Branch: refs/heads/master
Commit: 648e465f54f538a133fb31c9b1e3b487a6f2ca7c
Parents: 1644696 46f70c7
Author: Nick Vatamaniuc <va...@apache.org>
Authored: Wed Feb 8 13:11:47 2017 -0500
Committer: Nick Vatamaniuc <va...@apache.org>
Committed: Wed Feb 8 13:11:47 2017 -0500
----------------------------------------------------------------------
src/couch_replicator_changes_reader.erl | 9 +++++++--
test/couch_replicator_id_too_long_tests.erl | 2 +-
2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/648e465f/src/couch_replicator_changes_reader.erl
----------------------------------------------------------------------