[couchdb] branch master updated: Move Jenkins to use Erlang 19 for initial build step (#1866)

2019-01-18 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 1ee35e8  Move Jenkins to use Erlang 19 for initial build step (#1866)
1ee35e8 is described below

commit 1ee35e808b9b3e41b31d1d31246b226308f68a4b
Author: Joan Touzet 
AuthorDate: Fri Jan 18 11:53:55 2019 -0500

Move Jenkins to use Erlang 19 for initial build step (#1866)
---
 Jenkinsfile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 46fb723..b793343 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -38,14 +38,14 @@ pipeline {
 }
   }
   steps {
-// This image has the oldest Erlang we support, 16B03
-sh 'docker pull couchdbdev/debian-jessie-erlang-17.5.3:latest'
+// This image has the oldest Erlang we support, 19
+sh 'docker pull couchdbdev/debian-stretch-erlang-19.3.6'
 timeout(time: 15, unit: "MINUTES") {
   // 
https://github.com/jenkins-infra/jenkins.io/blob/master/Jenkinsfile#64
   // We need the jenkins user mapped inside of the image
   // npm config cache below is required because /home/jenkins doesn't
   // ACTUALLY exist in the image
-  withDockerContainer(image: 'couchdbdev/debian-jessie-erlang-17.5.3', 
args: '-e npm_config_cache=npm-cache -e HOME=. -v=/etc/passwd:/etc/passwd -v 
/etc/group:/etc/group') {
+  withDockerContainer(image: 
'couchdbdev/debian-stretch-erlang-19.3.6', args: '-e npm_config_cache=npm-cache 
-e HOME=. -v=/etc/passwd:/etc/passwd -v /etc/group:/etc/group') {
 sh '''
   set
   rm -rf apache-couchdb-*



[couchdb] branch jenkins-fix-build deleted (was fab0243)

2019-01-18 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch jenkins-fix-build
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 was fab0243  Move Jenkins to use Erlang 19 for initial build step

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[couchdb] branch jenkins-fix-purge-tests updated (01dad3b -> 69ce06e)

2019-01-18 Thread davisp
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a change to branch jenkins-fix-purge-tests
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 discard 01dad3b  Fix timeout in chttpd_purge_tests
 new 1ee35e8  Move Jenkins to use Erlang 19 for initial build step (#1866)
 new 69ce06e  Fix timeout in chttpd_purge_tests

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (01dad3b)
\
 N -- N -- N   refs/heads/jenkins-fix-purge-tests (69ce06e)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 11532 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:
 Jenkinsfile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)



[couchdb] branch feature/database-partitions updated (8cd68be -> 91af772)

2019-01-18 Thread davisp
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a change to branch feature/database-partitions
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 discard 8cd68be  Add Elixir tests for database partitions
 discard 43cf384  Support partitioned queries in Mango
 discard 3cac240  Use index names when testing index selection
 discard 095392a  Optimize offset/limit for partition queries
 discard 23ab71a  Optimize all_docs queries in a single partition
 discard 08a087a  Implement partitioned views
 discard dfa98b4  Implement `couch_db:get_partition_info/2`
 discard ebd9211  Implement partitioned dbs
 discard 4355825  Implement configurable hash functions
 discard 79b90f5  Validate design document options more strictly
 discard 9c48da4  Pass the DB record to index validation functions
 discard 9872652  Implement `fabric_util:open_cluster_db`
 discard e9024bf  Improve `couch_db:clustered_db` flexibility
 discard fae1207  Add PSE API to store opaque properties
 new 0f833fd  Fix timeout in chttpd_purge_tests
 new 442c302  Add PSE API to store opaque properties
 new 62a294f  Improve `couch_db:clustered_db` flexibility
 new cea5ea0  Implement `fabric_util:open_cluster_db`
 new 993a85f  Pass the DB record to index validation functions
 new c5569ed  Validate design document options more strictly
 new 6adcb18  Implement configurable hash functions
 new d964ab5  Implement partitioned dbs
 new a5cd962  Implement `couch_db:get_partition_info/2`
 new cada5c5  Implement partitioned views
 new dc53a3f  Optimize all_docs queries in a single partition
 new fe6849f  Optimize offset/limit for partition queries
 new 234a963  Use index names when testing index selection
 new 0541a31  Support partitioned queries in Mango
 new 91af772  Add Elixir tests for database partitions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (8cd68be)
\
 N -- N -- N   refs/heads/feature/database-partitions (91af772)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 11546 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/chttpd/test/chttpd_purge_tests.erl | 36 +++---
 1 file changed, 25 insertions(+), 11 deletions(-)



[couchdb] branch feature/database-partitions deleted (was 91af772)

2019-01-18 Thread davisp
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a change to branch feature/database-partitions
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 was 91af772  Add Elixir tests for database partitions

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[couchdb-documentation] branch shard-level-docs updated (60d9584 -> 890935b)

2019-01-18 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch shard-level-docs
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git.


 discard 60d9584  Document 1x new and 2x undocumented shard endpoints
 new 890935b  Document 1x new and 2x undocumented shard endpoints

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (60d9584)
\
 N -- N -- N   refs/heads/shard-level-docs (890935b)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 945 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/api/database/shard.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[couchdb] branch add-shard-sync-api updated (083881b -> 8e8be73)

2019-01-18 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch add-shard-sync-api
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


from 083881b  Merge branch 'master' into add-shard-sync-api
 new aeb1ba4  Use an accumulator when merging revision trees
 new 8d2af71  Enforce partition size limits
 new 8e8be73  Merge branch 'master' into add-shard-sync-api

The 11552 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:
 rel/overlay/etc/default.ini|   5 +
 src/chttpd/src/chttpd.erl  |   5 +
 src/couch/src/couch_db_updater.erl | 143 ++--
 test/elixir/test/partition_size_limit_test.exs | 305 +
 4 files changed, 443 insertions(+), 15 deletions(-)
 create mode 100644 test/elixir/test/partition_size_limit_test.exs



[couchdb-documentation] branch shard-level-docs created (now 60d9584)

2019-01-18 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch shard-level-docs
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git.


  at 60d9584  Document 1x new and 2x undocumented shard endpoints

This branch includes the following new commits:

 new e1caf29  Transmogrify Couchbase XML to .rst and support Sphinx
 new c4e7664  Integrate Sphinx into autotools
 new 2f46fc8  Add docs and search links into Futon
 new 1e26da6  Added support for `make -j` and `make -n`
 new 162a0b0  Docs: add notes on CORS functionality
 new 6bf4903  reflect that we reverted 1334 in the various change log files
 new 03c60a2  document number encoding
 new 666816d  add contributing chapter
 new 78b8df8  Use our official doc links
 new 23eb3a0  Update copyright year to 2013
 new d7b0bd3  add pbkdf2 iterations config to docs
 new 6181a15  Fix: documentation contains GeoCouch specifics
 new 006f5de  Mention CORS support in 1.3.0 changelog.
 new d8886a5  docs: improve language in Erlang query server section.
 new 70f5953  docs: improve language, consistency in JS query server section
 new 5a2b561  docs: improve language, consistency in CommonJS section
 new 55e26ed  docs: fix Sphinx warning
 new f499ccb  Fix grammar in EventSource feed type introduction.
 new fa5e15e  Note the need for allowing CORS for EventSource feeds.
 new d1feb65  Fix errors in, improve style of EventSource example code.
 new b73ebea  docs: add error handling code to EventSource example
 new adfc77b  docs: clean up the contributing guide a little
 new a897d6c  docs: move section on HTTP range requests into API chapter
 new 4e2ab84  docs: merge API introduction and actual reference material
 new 19222b4  docs: move section on OS daemons into configuration chapter
 new 120a539  docs: move section on SSL support into configuration chapter
 new 7bf25f8  docs: move section on HTTP proxying into configuration chapter
 new 9fe5670  docs: update Makefile.am for recent section folding
 new 7195359  docs: move sections on vhosts, URL rewriting into 
configuration chapter
 new 798b193  docs: fold section on CORS into configuration chapter
 new e6f1856  docs: improve language, structure in CORS section
 new 5db9750  docs: merge separate CommonJS sections
 new d35fa7e  docs: cut useless section on file permission error messages
 new 3ba5b1a  docs: move upgrade notes into changelog chapter
 new bb1dd17  docs: move configuration reference down a bit
 new 06b722a  docs: improve chapter title consistency
 new d34c061  docs: add Upgrade Notes for 1.2.0
 new 3b6420c  docs: add more structure to the release history
 new 23ed1a5  docs: don't refer to release chapter in build system
 new e01d537  docs: rewrite sentence about HTTP admins interface
 new d99b0c8  Forward port 1.3.1 changes
 new 8650724  Allow storing a pre-hashed admin password
 new 814682d  Add documentation on replication
 new dd1a162  Use Array#forEach instead of for .. in
 new f7dbbce  Expanded description of the validate_doc_update function
 new 78c2b4a  Fix database info's instance_start_time field description
 new 6c0959f  Copy preliminary 1.4 changelog items to docs.
 new 8d6d586  Support Last-Event-ID header for eventsource changes feeds
 new 1598201  Import couch_dbupdates from rcouch.
 new e8eb9e9  Merge branch '1684-feature-db-updates'
 new 25ac5c1  Apply _list functions for _all_docs view. COUCHDB-1139
 new 17211e0  Fill out the 1.4.0 changelog.
 new 242d133  Add 1.2.1 changes to docs changelog.
 new 2f2f681  Add 1.1.2 changes to docs changelog.
 new 30b5b4d  Add 1.0.4 changes to docs changelog.
 new 83f75f6  Add security section to 1.0.2 changelog.
 new 4411205  Mention CVE in 0.11.2 changelog.
 new 4098026  Add COUCHDB-1838 warning for public_fields in two places.
 new 070591c  Add documentation on users_db_public (see COUCHDB-1838).
 new e33c87c  document header config for cors
 new 043248c  [docs] clariy purpose of purge
 new d35ff69  Fix typo, consistency with vertical whitespace.
 new a272c74  Update version in documentation.
 new 0b80721  Add 'html/contributing.html' to 'Makefile.am'
 new 0b2dcca  Setup API sections references.
 new a6881ad  Fix references to API
 new b8b1773  Split configuring.rst into the set of articles.
 new 071aa00  Describe attachments config section.
 new 731b202  Describe vendor config section.
 new 524d7ff  Describe couchdb config section.
 new 16fd6e6  Describe uuids config section. Tweak a bit related API 
section.
 new 02b35b8  Describe stats config section.
 new 363c273  Describe couch_httpd_auth config section.
 new 69ea8c3  Improve vhosts config docs using CouchDB sources.
 new be8f134  Sort httpd 

[couchdb] branch feature/database-partition-limits updated (4dfefd1 -> ed80277)

2019-01-18 Thread davisp
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a change to branch feature/database-partition-limits
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 discard 4dfefd1  Enforce partition size limits
 discard 1247176  Use an accumulator when merging revision trees
 discard 51a482e  Add Elixir tests for database partitions
 discard 2f16d54  Support partitioned queries in Mango
 discard 8bc56f8  Use index names when testing index selection
 discard 391a0ed  Optimize offset/limit for partition queries
 discard e81ebc4  Optimize all_docs queries in a single partition
 discard 2d6dbf0  Implement partitioned views
 discard f12f382  Implement `couch_db:get_partition_info/2`
 discard f5a2cd4  Implement partitioned dbs
 discard c0468fe  Implement configurable hash functions
 discard 7762619  Validate design document options more strictly
 discard c30725d  Pass the DB record to index validation functions
 discard 1b1a6bb  Implement `fabric_util:open_cluster_db`
 discard dbbbc65  Improve `couch_db:clustered_db` flexibility
 discard aa32cb6  Add PSE API to store opaque properties
 new 90d5bf6  Support one purge request with more than 100 docid
 new a3f99df  Merge pull request #1865 from 
apache/purge_request_with_101_docid
 new 1ee35e8  Move Jenkins to use Erlang 19 for initial build step (#1866)
 new fae1207  Add PSE API to store opaque properties
 new e9024bf  Improve `couch_db:clustered_db` flexibility
 new 9872652  Implement `fabric_util:open_cluster_db`
 new 9c48da4  Pass the DB record to index validation functions
 new 79b90f5  Validate design document options more strictly
 new 4355825  Implement configurable hash functions
 new ebd9211  Implement partitioned dbs
 new dfa98b4  Implement `couch_db:get_partition_info/2`
 new 08a087a  Implement partitioned views
 new 23ab71a  Optimize all_docs queries in a single partition
 new 095392a  Optimize offset/limit for partition queries
 new 3cac240  Use index names when testing index selection
 new 43cf384  Support partitioned queries in Mango
 new 8cd68be  Add Elixir tests for database partitions
 new ca37b6c  Use an accumulator when merging revision trees
 new ed80277  Enforce partition size limits

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (4dfefd1)
\
 N -- N -- N   refs/heads/feature/database-partition-limits 
(ed80277)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 11547 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:
 Jenkinsfile|  6 +++---
 src/chttpd/test/chttpd_purge_tests.erl | 21 +
 src/fabric/src/fabric_doc_purge.erl|  2 +-
 3 files changed, 25 insertions(+), 4 deletions(-)



[couchdb] branch master updated (0f833fd -> 16e6af4)

2019-01-18 Thread davisp
This is an automated email from the ASF dual-hosted git repository.

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


from 0f833fd  Fix timeout in chttpd_purge_tests
 new 5d219dd  Add PSE API to store opaque properties
 new 24a3698  Improve `couch_db:clustered_db` flexibility
 new 3ff043e  Implement `fabric_util:open_cluster_db`
 new 72eb129  Pass the DB record to index validation functions
 new 7bbe828  Validate design document options more strictly
 new 05678b9  Implement configurable hash functions
 new 25ac408  Implement partitioned dbs
 new 6edb9a5  Implement `couch_db:get_partition_info/2`
 new 3a1dd0a  Implement partitioned views
 new eb1ffcf  Optimize all_docs queries in a single partition
 new dc369e9  Optimize offset/limit for partition queries
 new 47efcbd  Use index names when testing index selection
 new 53d3515  Support partitioned queries in Mango
 new 16e6af4  Add Elixir tests for database partitions

The 11546 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/chttpd/src/chttpd.erl  |   2 +
 src/chttpd/src/chttpd_db.erl   | 148 --
 src/chttpd/src/chttpd_httpd_handlers.erl   |   1 +
 src/chttpd/src/chttpd_show.erl |   2 +-
 src/chttpd/src/chttpd_view.erl |   8 +-
 .../test/chttpd_db_bulk_get_multipart_test.erl |  29 +-
 src/chttpd/test/chttpd_db_bulk_get_test.erl|  14 +-
 src/couch/src/couch_bt_engine.erl  |  98 +++-
 src/couch/src/couch_bt_engine_compactor.erl|   8 +-
 src/couch/src/couch_bt_engine_header.erl   |   3 +-
 src/couch/src/couch_btree.erl  |   6 +-
 src/couch/src/couch_db.erl |  68 ++-
 src/couch/src/couch_db_engine.erl  |  50 ++
 src/couch/src/couch_db_updater.erl |   9 +-
 src/couch/src/couch_ejson_compare.erl  |   4 +
 src/couch/src/couch_httpd.erl  |   2 +
 src/couch/src/couch_httpd_db.erl   |  44 +-
 src/couch/src/couch_partition.erl  | 164 ++
 src/couch/src/couch_server.erl |   4 +
 src/couch/test/couch_db_props_upgrade_tests.erl|  83 +++
 src/couch_index/src/couch_index_server.erl |   4 +-
 src/couch_mrview/include/couch_mrview.hrl  |   1 +
 src/couch_mrview/src/couch_mrview.erl  |  28 +-
 src/couch_mrview/src/couch_mrview_http.erl |   6 +-
 src/couch_mrview/src/couch_mrview_index.erl|  31 +-
 src/couch_mrview/src/couch_mrview_show.erl |   3 +-
 src/couch_mrview/src/couch_mrview_updater.erl  |  38 +-
 src/couch_mrview/src/couch_mrview_util.erl | 139 -
 src/fabric/src/fabric.erl  |  60 ++-
 src/fabric/src/fabric_db_create.erl|   7 +-
 src/fabric/src/fabric_db_info.erl  |  15 +-
 src/fabric/src/fabric_db_partition_info.erl|  99 
 src/fabric/src/fabric_doc_update.erl   |   8 +-
 src/fabric/src/fabric_rpc.erl  |  17 +-
 src/fabric/src/fabric_streams.erl  |   1 -
 src/fabric/src/fabric_util.erl |  45 +-
 src/fabric/src/fabric_view.erl |  51 +-
 src/fabric/src/fabric_view_all_docs.erl|  36 +-
 src/fabric/src/fabric_view_map.erl |  10 +-
 src/fabric/src/fabric_view_reduce.erl  |  10 +-
 src/mango/src/mango_cursor.erl |   1 +
 src/mango/src/mango_cursor_text.erl|   9 +
 src/mango/src/mango_cursor_view.erl|   6 +
 src/mango/src/mango_error.erl  |   7 +
 src/mango/src/mango_httpd.erl  |  23 +-
 src/mango/src/mango_idx.erl| 114 +++-
 src/mango/src/mango_idx.hrl|   1 +
 src/mango/src/mango_idx_text.erl   |   1 +
 src/mango/src/mango_idx_view.erl   |   1 +
 src/mango/src/mango_opts.erl   |  30 ++
 src/mango/test/05-index-selection-test.py  |  20 +-
 src/mango/test/user_docs.py|  37 +-
 src/mem3/src/mem3.erl  |  20 +-
 src/mem3/src/mem3_hash.erl |  73 +++
 src/mem3/src/mem3_shards.erl   |   4 +-
 src/mem3/src/mem3_util.erl |  21 +-
 .../test/mem3_hash_test.erl}   |  13 +-
 src/mem3/test/mem3_util_test.erl   |   8 -
 test/elixir/lib/couch/db_test.ex   |  12 +-
 test/elixir/test/partition_all_docs_test.exs   | 118 
 

[couchdb] branch add-shard-sync-api deleted (was 8e8be73)

2019-01-18 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch add-shard-sync-api
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 was 8e8be73  Merge branch 'master' into add-shard-sync-api

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[couchdb] branch master updated: Add new /{db}/_sync_shards endpoint (admin-only) (#1811)

2019-01-18 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 6cb0506  Add new /{db}/_sync_shards endpoint (admin-only) (#1811)
6cb0506 is described below

commit 6cb050610abde7a822d340b2652cba36b4f2b287
Author: Joan Touzet 
AuthorDate: Fri Jan 18 15:16:19 2019 -0500

Add new /{db}/_sync_shards endpoint (admin-only) (#1811)

This server admin-only endpoint forces an n-way sync of all shards
across all nodes on which they are hosted.

This can be useful for an administrator adding a new node to the
cluster, after updating _dbs so that the new node hosts an existing db
with content, to force the new node to sync all of that db's shards.

Users may want to bump their `[mem3] sync_concurrency` value to a
larger figure for the duration of the shards sync.

Closes #1807
---
 src/chttpd/src/chttpd_auth_request.erl |  2 ++
 src/mem3/src/mem3_httpd.erl| 20 +++-
 src/mem3/src/mem3_httpd_handlers.erl   |  1 +
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/src/chttpd/src/chttpd_auth_request.erl 
b/src/chttpd/src/chttpd_auth_request.erl
index 9110ed6..f85eb97 100644
--- a/src/chttpd/src/chttpd_auth_request.erl
+++ b/src/chttpd/src/chttpd_auth_request.erl
@@ -70,6 +70,8 @@ authorize_request_int(#httpd{path_parts=[_DbName, 
<<"_compact">>|_]}=Req) ->
 require_db_admin(Req);
 authorize_request_int(#httpd{path_parts=[_DbName, <<"_view_cleanup">>]}=Req) ->
 require_db_admin(Req);
+authorize_request_int(#httpd{path_parts=[_DbName, <<"_sync_shards">>]}=Req) ->
+require_admin(Req);
 authorize_request_int(#httpd{path_parts=[_DbName|_]}=Req) ->
 db_authorization_check(Req).
 
diff --git a/src/mem3/src/mem3_httpd.erl b/src/mem3/src/mem3_httpd.erl
index 571f063..c922141 100644
--- a/src/mem3/src/mem3_httpd.erl
+++ b/src/mem3/src/mem3_httpd.erl
@@ -12,7 +12,8 @@
 
 -module(mem3_httpd).
 
--export([handle_membership_req/1, handle_shards_req/2]).
+-export([handle_membership_req/1, handle_shards_req/2,
+handle_sync_req/2]).
 
 %% includes
 -include_lib("mem3/include/mem3.hrl").
@@ -52,6 +53,16 @@ handle_shards_req(#httpd{path_parts=[_DbName, 
<<"_shards">>]}=Req, _Db) ->
 handle_shards_req(#httpd{path_parts=[_DbName, <<"_shards">>, _DocId]}=Req, 
_Db) ->
 chttpd:send_method_not_allowed(Req, "GET").
 
+handle_sync_req(#httpd{method='POST',
+path_parts=[_DbName, <<"_sync_shards">>]} = Req, Db) ->
+DbName = mem3:dbname(couch_db:name(Db)),
+ShardList = [S#shard.name || S <- mem3:ushards(DbName)],
+[ sync_shard(S) || S <- ShardList ],
+chttpd:send_json(Req, 202, {[{ok, true}]});
+handle_sync_req(Req, _) ->
+chttpd:send_method_not_allowed(Req, "POST").
+
+
 %%
 %% internal
 %%
@@ -64,3 +75,10 @@ json_shards([#shard{node=Node, range=[B,E]} | Rest], AccIn) 
->
 HexEnd = couch_util:to_hex(<>),
 Range = list_to_binary(HexBeg ++ "-" ++ HexEnd),
 json_shards(Rest, dict:append(Range, Node, AccIn)).
+
+sync_shard(ShardName) ->
+Shards = mem3_shards:for_shard_name(ShardName),
+[rpc:call(S1#shard.node, mem3_sync, push, [S1, S2#shard.node]) ||
+S1 <- Shards, S2 <- Shards, S1 =/= S2],
+ok.
+
diff --git a/src/mem3/src/mem3_httpd_handlers.erl 
b/src/mem3/src/mem3_httpd_handlers.erl
index d8e138c..7cbd9fe 100644
--- a/src/mem3/src/mem3_httpd_handlers.erl
+++ b/src/mem3/src/mem3_httpd_handlers.erl
@@ -18,6 +18,7 @@ url_handler(<<"_membership">>) -> fun 
mem3_httpd:handle_membership_req/1;
 url_handler(_) -> no_match.
 
 db_handler(<<"_shards">>) -> fun mem3_httpd:handle_shards_req/2;
+db_handler(<<"_sync_shards">>)   -> fun mem3_httpd:handle_sync_req/2;
 db_handler(_) -> no_match.
 
 design_handler(_) -> no_match.



[couchdb] branch feature/database-partition-limits deleted (was 567efbd)

2019-01-18 Thread davisp
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a change to branch feature/database-partition-limits
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 was 567efbd  Enforce partition size limits

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[couchdb] branch master updated: Fix timeout in chttpd_purge_tests

2019-01-18 Thread davisp
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 0f833fd  Fix timeout in chttpd_purge_tests
0f833fd is described below

commit 0f833fd0c20ba0227028776c398ccd8cd13b93b3
Author: Paul J. Davis 
AuthorDate: Fri Jan 18 10:52:24 2019 -0600

Fix timeout in chttpd_purge_tests
---
 src/chttpd/test/chttpd_purge_tests.erl | 36 +++---
 1 file changed, 25 insertions(+), 11 deletions(-)

diff --git a/src/chttpd/test/chttpd_purge_tests.erl 
b/src/chttpd/test/chttpd_purge_tests.erl
index 50f7e18..dbd73de 100644
--- a/src/chttpd/test/chttpd_purge_tests.erl
+++ b/src/chttpd/test/chttpd_purge_tests.erl
@@ -52,6 +52,11 @@ create_doc(Url, Id, Content) ->
 [?CONTENT_JSON, ?AUTH], "{\"mr\": \"" ++ Content ++ "\"}").
 
 
+create_docs(Url, Docs) ->
+test_request:post(Url ++ "/_bulk_docs",
+[?CONTENT_JSON, ?AUTH], ?JSON_ENCODE({[{docs, Docs}]})).
+
+
 delete_db(Url) ->
 {ok, 200, _, _} = test_request:delete(Url, [?AUTH]).
 
@@ -141,20 +146,29 @@ test_ok_purge_request(Url) ->
 test_ok_purge_request_with_101_docid(Url) ->
 ?_test(begin
 PurgedDocsNum = 101,
-IdsRevsEJson = lists:foldl(fun(I, CIdRevs) ->
+Docs = lists:foldl(fun(I, Acc) ->
 Id = list_to_binary(integer_to_list(I)),
-{ok, _, _, Body} = create_doc(Url, Id),
-{Json} = ?JSON_DECODE(Body),
-Rev = couch_util:get_value(<<"rev">>, Json, undefined),
-[{Id, [Rev]} | CIdRevs]
- end, [], lists:seq(1, PurgedDocsNum)),
+Doc = {[{<<"_id">>, Id}, {value, I}]},
+[Doc | Acc]
+end, [], lists:seq(1, PurgedDocsNum)),
+
+{ok, _, _, Body} = create_docs(Url, Docs),
+BodyJson = ?JSON_DECODE(Body),
+
+PurgeBody = lists:map(fun({DocResp}) ->
+Id = couch_util:get_value(<<"id">>, DocResp, undefined),
+Rev = couch_util:get_value(<<"rev">>, DocResp, undefined),
+{Id, [Rev]}
+end, BodyJson),
 
-IdsRevs = binary_to_list(?JSON_ENCODE({IdsRevsEJson})),
 ok = config:set("purge", "max_document_id_number", "101"),
-{ok, Status, _, _} = test_request:post(Url ++ "/_purge/",
-[?CONTENT_JSON, ?AUTH], IdsRevs),
-ok = config:delete("purge", "max_document_id_number"),
-?assert(Status =:= 201 orelse Status =:= 202)
+try
+{ok, Status, _, _} = test_request:post(Url ++ "/_purge/",
+[?CONTENT_JSON, ?AUTH], ?JSON_ENCODE({PurgeBody})),
+?assert(Status =:= 201 orelse Status =:= 202)
+after
+ok = config:delete("purge", "max_document_id_number")
+end
 end).
 
 



[couchdb] branch jenkins-fix-purge-tests deleted (was 69ce06e)

2019-01-18 Thread davisp
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a change to branch jenkins-fix-purge-tests
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 was 69ce06e  Fix timeout in chttpd_purge_tests

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[couchdb] branch add-shard-sync-api updated (c25fd2e -> 9d4cb03)

2019-01-18 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch add-shard-sync-api
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 discard c25fd2e  Merge branch 'master' into add-shard-sync-api
 discard 0f833fd  Fix timeout in chttpd_purge_tests
 discard 054b610  Merge branch 'master' into add-shard-sync-api
 discard 1ee35e8  Move Jenkins to use Erlang 19 for initial build step (#1866)
 discard a3f99df  Merge pull request #1865 from 
apache/purge_request_with_101_docid
 discard 90d5bf6  Support one purge request with more than 100 docid
 discard 5269d79  Fix fabric_open_doc_revs
 discard 38c1ab4  Improve vm.args template comments (#1861)
 discard c6b095b  Fix read repair in a mixed cluster environment
 discard 587d674  Fix end_time field in /_replicate response
 discard 72b788e  Merge pull request #1808 from apache/before_doc_update
 discard c68863a  Update before_doc_update/2 to before_doc_update/3
 discard dc93156  Merge pull request #1831 from 
apache/intro-cpse_test_purge_seqs
 discard d12c22b  Introduce cpse_test_purge_seqs again
 discard f708c05  happy new year (#1838)
 discard db3b365  Merge pull request #1833 from cloudant/minimum-erlang-otp-19
 discard 21359d2  Change minimum supported Erlang version to OTP 19
 discard c347470  Remove obsolete travis files
 discard 7be0ab8  Remove explicit modules list from .app.src files
 discard 26cee91  Merge pull request #1798 from 
cloudant/suppress-compiler-warnings
 discard 4e75964  Suppress export-related compiler warnings
 discard 899b49c  Reduce number of behaviour undefined compiler warnings
 discard f29cdb4  Suppress misc compiler warnings
 discard 4cc9565  Suppress unused function compiler warnings
 discard b9b333b  Suppress crypto and random compiler warnings
 discard f519b26  Suppress unused variable and type compiler warnings
 discard cb10e48  Suppress variable exported from 'case' compiler warnings
 discard ea20abc  Merge pull request #1829 from 
cloudant/elixir-test-improvements
 discard add9fae  Do not automatically fail tests if quorum conditions unmet
 discard 90c0a6f  Improve all_docs_test robustness
 discard c54bea3  Fix elixir test formatting
 discard e97f029  Remove shim couch_replicator_manager module
 discard 632f303  Clean rexi stream workers when coordinator process is killed
 discard 88dd125  Move fabric streams to a fabric_streams module
 discard f60f7a1  Suppress credo TODO suggests (#1822)
 discard f4195a0  Migrate cluster with(out) quorum js tests as elixir tests 
(#1812)
 discard 11feb2f  Increase timeout on restart in JS/elixir tests to 30s (#1820)
 discard 92adefa  Merge pull request #1800 from 
cloudant/allow-specifying-individual-elixir-tests
 discard 42bd274  Add new /{db}/_sync_shards endpoint (admin-only)
 discard 82c9219  Merge branch 'master' into 
allow-specifying-individual-elixir-tests
 discard be38d66  Support specifying individual Elixir tests to run
 new 9d4cb03  Add new /{db}/_sync_shards endpoint (admin-only)

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (c25fd2e)
\
 N -- N -- N   refs/heads/add-shard-sync-api (9d4cb03)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 11495 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:
 .travis.yml|   2 +
 Jenkinsfile|   6 +-
 LICENSE|   2 +-
 Makefile   |  20 +-
 Makefile.win   |  21 +-
 NOTICE |   2 +-
 rebar.config.script|   6 +-
 rel/overlay/etc/vm.args|  15 +-
 src/chttpd/.travis.yml |  23 ++
 src/chttpd/src/chttpd.app.src  |  13 ++
 src/chttpd/src/chttpd_sup.erl  |   2 +-
 src/chttpd/test/chttpd_purge_tests.erl |  35 ---
 src/couch/.travis.yml  |  23 ++
 src/couch/include/couch_db.hrl |   1 -
 src/couch/rebar.config.script  |   4 +
 src/couch/src/couch.erl|   6 +-
 src/couch/src/couch_btree.erl 

[couchdb] branch feature/database-partition-limits updated (d708bd6 -> 567efbd)

2019-01-18 Thread davisp
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a change to branch feature/database-partition-limits
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 discard d708bd6  Enforce partition size limits
 discard 68a0557  Use an accumulator when merging revision trees
 discard 91af772  Add Elixir tests for database partitions
 discard 0541a31  Support partitioned queries in Mango
 discard 234a963  Use index names when testing index selection
 discard fe6849f  Optimize offset/limit for partition queries
 discard dc53a3f  Optimize all_docs queries in a single partition
 discard cada5c5  Implement partitioned views
 discard a5cd962  Implement `couch_db:get_partition_info/2`
 discard d964ab5  Implement partitioned dbs
 discard 6adcb18  Implement configurable hash functions
 discard c5569ed  Validate design document options more strictly
 discard 993a85f  Pass the DB record to index validation functions
 discard cea5ea0  Implement `fabric_util:open_cluster_db`
 discard 62a294f  Improve `couch_db:clustered_db` flexibility
 discard 442c302  Add PSE API to store opaque properties
 new 5d219dd  Add PSE API to store opaque properties
 new 24a3698  Improve `couch_db:clustered_db` flexibility
 new 3ff043e  Implement `fabric_util:open_cluster_db`
 new 72eb129  Pass the DB record to index validation functions
 new 7bbe828  Validate design document options more strictly
 new 05678b9  Implement configurable hash functions
 new 25ac408  Implement partitioned dbs
 new 6edb9a5  Implement `couch_db:get_partition_info/2`
 new 3a1dd0a  Implement partitioned views
 new eb1ffcf  Optimize all_docs queries in a single partition
 new dc369e9  Optimize offset/limit for partition queries
 new 47efcbd  Use index names when testing index selection
 new 53d3515  Support partitioned queries in Mango
 new 16e6af4  Add Elixir tests for database partitions
 new d830e0c  Use an accumulator when merging revision trees
 new 567efbd  Enforce partition size limits

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (d708bd6)
\
 N -- N -- N   refs/heads/feature/database-partition-limits 
(567efbd)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 11548 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:



[couchdb] branch add-shard-sync-api updated (42bd274 -> 054b610)

2019-01-18 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch add-shard-sync-api
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


from 42bd274  Add new /{db}/_sync_shards endpoint (admin-only)
 new be38d66  Support specifying individual Elixir tests to run
 new 82c9219  Merge branch 'master' into 
allow-specifying-individual-elixir-tests
 new 92adefa  Merge pull request #1800 from 
cloudant/allow-specifying-individual-elixir-tests
 new 11feb2f  Increase timeout on restart in JS/elixir tests to 30s (#1820)
 new f4195a0  Migrate cluster with(out) quorum js tests as elixir tests 
(#1812)
 new f60f7a1  Suppress credo TODO suggests (#1822)
 new 88dd125  Move fabric streams to a fabric_streams module
 new 632f303  Clean rexi stream workers when coordinator process is killed
 new e97f029  Remove shim couch_replicator_manager module
 new c54bea3  Fix elixir test formatting
 new 90c0a6f  Improve all_docs_test robustness
 new add9fae  Do not automatically fail tests if quorum conditions unmet
 new ea20abc  Merge pull request #1829 from 
cloudant/elixir-test-improvements
 new cb10e48  Suppress variable exported from 'case' compiler warnings
 new f519b26  Suppress unused variable and type compiler warnings
 new b9b333b  Suppress crypto and random compiler warnings
 new 4cc9565  Suppress unused function compiler warnings
 new f29cdb4  Suppress misc compiler warnings
 new 899b49c  Reduce number of behaviour undefined compiler warnings
 new 4e75964  Suppress export-related compiler warnings
 new 26cee91  Merge pull request #1798 from 
cloudant/suppress-compiler-warnings
 new 7be0ab8  Remove explicit modules list from .app.src files
 new c347470  Remove obsolete travis files
 new 21359d2  Change minimum supported Erlang version to OTP 19
 new db3b365  Merge pull request #1833 from cloudant/minimum-erlang-otp-19
 new f708c05  happy new year (#1838)
 new d12c22b  Introduce cpse_test_purge_seqs again
 new dc93156  Merge pull request #1831 from 
apache/intro-cpse_test_purge_seqs
 new c68863a  Update before_doc_update/2 to before_doc_update/3
 new 72b788e  Merge pull request #1808 from apache/before_doc_update
 new 587d674  Fix end_time field in /_replicate response
 new c6b095b  Fix read repair in a mixed cluster environment
 new 38c1ab4  Improve vm.args template comments (#1861)
 new 5269d79  Fix fabric_open_doc_revs
 new 90d5bf6  Support one purge request with more than 100 docid
 new a3f99df  Merge pull request #1865 from 
apache/purge_request_with_101_docid
 new 1ee35e8  Move Jenkins to use Erlang 19 for initial build step (#1866)
 new 054b610  Merge branch 'master' into add-shard-sync-api

The 11533 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:
 .travis.yml|   2 -
 Jenkinsfile|   6 +-
 LICENSE|   2 +-
 Makefile   |  20 +-
 Makefile.win   |  21 +-
 NOTICE |   2 +-
 rebar.config.script|   6 +-
 rel/overlay/etc/vm.args|  15 +-
 src/chttpd/.travis.yml |  23 --
 src/chttpd/src/chttpd.app.src  |  13 --
 src/chttpd/src/chttpd_sup.erl  |   2 +-
 src/chttpd/test/chttpd_purge_tests.erl |  21 ++
 src/couch/.travis.yml  |  23 --
 src/couch/include/couch_db.hrl |   1 +
 src/couch/rebar.config.script  |   4 -
 src/couch/src/couch.erl|   6 +-
 src/couch/src/couch_btree.erl  |   7 +-
 src/couch/src/couch_compaction_daemon.erl  |  10 +-
 src/couch/src/couch_db.erl |  10 +-
 src/couch/src/couch_db_plugin.erl  |  12 +-
 src/couch/src/couch_debug.erl  |   2 +-
 src/couch/src/couch_rand.erl   |  30 ---
 src/couch/src/couch_server.erl |  28 +--
 src/couch/src/couch_users_db.erl   |   4 +-
 src/couch/src/couch_util.erl   |   9 -
 src/couch/src/couch_uuids.erl  |   2 +-
 src/couch/test/couch_changes_tests.erl | 176 +++
 src/couch/test/couch_db_plugin_tests.erl   |  17 +-
 src/couch/test/couch_doc_json_tests.erl|   2 +
 src/couch/test/couch_file_tests.erl|   2 +-
 src/couch/test/couch_flags_tests.erl   |  16 +-
 

[couchdb] branch feature/database-partition-limits updated (ed80277 -> d708bd6)

2019-01-18 Thread davisp
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a change to branch feature/database-partition-limits
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 discard ed80277  Enforce partition size limits
 discard ca37b6c  Use an accumulator when merging revision trees
 discard 8cd68be  Add Elixir tests for database partitions
 discard 43cf384  Support partitioned queries in Mango
 discard 3cac240  Use index names when testing index selection
 discard 095392a  Optimize offset/limit for partition queries
 discard 23ab71a  Optimize all_docs queries in a single partition
 discard 08a087a  Implement partitioned views
 discard dfa98b4  Implement `couch_db:get_partition_info/2`
 discard ebd9211  Implement partitioned dbs
 discard 4355825  Implement configurable hash functions
 discard 79b90f5  Validate design document options more strictly
 discard 9c48da4  Pass the DB record to index validation functions
 discard 9872652  Implement `fabric_util:open_cluster_db`
 discard e9024bf  Improve `couch_db:clustered_db` flexibility
 discard fae1207  Add PSE API to store opaque properties
 new 0f833fd  Fix timeout in chttpd_purge_tests
 new 442c302  Add PSE API to store opaque properties
 new 62a294f  Improve `couch_db:clustered_db` flexibility
 new cea5ea0  Implement `fabric_util:open_cluster_db`
 new 993a85f  Pass the DB record to index validation functions
 new c5569ed  Validate design document options more strictly
 new 6adcb18  Implement configurable hash functions
 new d964ab5  Implement partitioned dbs
 new a5cd962  Implement `couch_db:get_partition_info/2`
 new cada5c5  Implement partitioned views
 new dc53a3f  Optimize all_docs queries in a single partition
 new fe6849f  Optimize offset/limit for partition queries
 new 234a963  Use index names when testing index selection
 new 0541a31  Support partitioned queries in Mango
 new 91af772  Add Elixir tests for database partitions
 new 68a0557  Use an accumulator when merging revision trees
 new d708bd6  Enforce partition size limits

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (ed80277)
\
 N -- N -- N   refs/heads/feature/database-partition-limits 
(d708bd6)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 11548 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/chttpd/test/chttpd_purge_tests.erl | 36 +++---
 1 file changed, 25 insertions(+), 11 deletions(-)



[couchdb] branch master updated (16e6af4 -> 8d2af71)

2019-01-18 Thread davisp
This is an automated email from the ASF dual-hosted git repository.

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


from 16e6af4  Add Elixir tests for database partitions
 new aeb1ba4  Use an accumulator when merging revision trees
 new 8d2af71  Enforce partition size limits

The 11548 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:
 rel/overlay/etc/default.ini|   5 +
 src/chttpd/src/chttpd.erl  |   5 +
 src/couch/src/couch_db_updater.erl | 143 ++--
 test/elixir/test/partition_size_limit_test.exs | 305 +
 4 files changed, 443 insertions(+), 15 deletions(-)
 create mode 100644 test/elixir/test/partition_size_limit_test.exs



[couchdb-documentation] branch shard-level-docs updated (890935b -> b4ff699)

2019-01-18 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch shard-level-docs
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git.


 discard 890935b  Document 1x new and 2x undocumented shard endpoints
 new b4ff699  Document 1x new and 2x undocumented shard endpoints

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (890935b)
\
 N -- N -- N   refs/heads/shard-level-docs (b4ff699)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 945 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/cluster/sharding.rst | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)



[couchdb] branch add-shard-sync-api updated (9d4cb03 -> 85fbe71)

2019-01-18 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch add-shard-sync-api
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 discard 9d4cb03  Add new /{db}/_sync_shards endpoint (admin-only)
 new 85fbe71  Add new /{db}/_sync_shards endpoint (admin-only)

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (9d4cb03)
\
 N -- N -- N   refs/heads/add-shard-sync-api (85fbe71)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 11495 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/mem3/src/mem3_httpd.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[couchdb] branch add-shard-sync-api updated (85fbe71 -> e0ce19b)

2019-01-18 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch add-shard-sync-api
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


from 85fbe71  Add new /{db}/_sync_shards endpoint (admin-only)
 new be38d66  Support specifying individual Elixir tests to run
 new 82c9219  Merge branch 'master' into 
allow-specifying-individual-elixir-tests
 new 92adefa  Merge pull request #1800 from 
cloudant/allow-specifying-individual-elixir-tests
 new 11feb2f  Increase timeout on restart in JS/elixir tests to 30s (#1820)
 new f4195a0  Migrate cluster with(out) quorum js tests as elixir tests 
(#1812)
 new f60f7a1  Suppress credo TODO suggests (#1822)
 new 88dd125  Move fabric streams to a fabric_streams module
 new 632f303  Clean rexi stream workers when coordinator process is killed
 new e97f029  Remove shim couch_replicator_manager module
 new c54bea3  Fix elixir test formatting
 new 90c0a6f  Improve all_docs_test robustness
 new add9fae  Do not automatically fail tests if quorum conditions unmet
 new ea20abc  Merge pull request #1829 from 
cloudant/elixir-test-improvements
 new cb10e48  Suppress variable exported from 'case' compiler warnings
 new f519b26  Suppress unused variable and type compiler warnings
 new b9b333b  Suppress crypto and random compiler warnings
 new 4cc9565  Suppress unused function compiler warnings
 new f29cdb4  Suppress misc compiler warnings
 new 899b49c  Reduce number of behaviour undefined compiler warnings
 new 4e75964  Suppress export-related compiler warnings
 new 26cee91  Merge pull request #1798 from 
cloudant/suppress-compiler-warnings
 new 7be0ab8  Remove explicit modules list from .app.src files
 new c347470  Remove obsolete travis files
 new 21359d2  Change minimum supported Erlang version to OTP 19
 new db3b365  Merge pull request #1833 from cloudant/minimum-erlang-otp-19
 new f708c05  happy new year (#1838)
 new d12c22b  Introduce cpse_test_purge_seqs again
 new dc93156  Merge pull request #1831 from 
apache/intro-cpse_test_purge_seqs
 new c68863a  Update before_doc_update/2 to before_doc_update/3
 new 72b788e  Merge pull request #1808 from apache/before_doc_update
 new 587d674  Fix end_time field in /_replicate response
 new c6b095b  Fix read repair in a mixed cluster environment
 new 38c1ab4  Improve vm.args template comments (#1861)
 new 5269d79  Fix fabric_open_doc_revs
 new 90d5bf6  Support one purge request with more than 100 docid
 new a3f99df  Merge pull request #1865 from 
apache/purge_request_with_101_docid
 new 1ee35e8  Move Jenkins to use Erlang 19 for initial build step (#1866)
 new 0f833fd  Fix timeout in chttpd_purge_tests
 new e0ce19b  Merge branch 'master' into add-shard-sync-api

The 11534 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:
 .travis.yml|   2 -
 Jenkinsfile|   6 +-
 LICENSE|   2 +-
 Makefile   |  20 +-
 Makefile.win   |  21 +-
 NOTICE |   2 +-
 rebar.config.script|   6 +-
 rel/overlay/etc/vm.args|  15 +-
 src/chttpd/.travis.yml |  23 --
 src/chttpd/src/chttpd.app.src  |  13 --
 src/chttpd/src/chttpd_sup.erl  |   2 +-
 src/chttpd/test/chttpd_purge_tests.erl |  35 +++
 src/couch/.travis.yml  |  23 --
 src/couch/include/couch_db.hrl |   1 +
 src/couch/rebar.config.script  |   4 -
 src/couch/src/couch.erl|   6 +-
 src/couch/src/couch_btree.erl  |   7 +-
 src/couch/src/couch_compaction_daemon.erl  |  10 +-
 src/couch/src/couch_db.erl |  10 +-
 src/couch/src/couch_db_plugin.erl  |  12 +-
 src/couch/src/couch_debug.erl  |   2 +-
 src/couch/src/couch_rand.erl   |  30 ---
 src/couch/src/couch_server.erl |  28 +--
 src/couch/src/couch_users_db.erl   |   4 +-
 src/couch/src/couch_util.erl   |   9 -
 src/couch/src/couch_uuids.erl  |   2 +-
 src/couch/test/couch_changes_tests.erl | 176 +++
 src/couch/test/couch_db_plugin_tests.erl   |  17 +-
 src/couch/test/couch_doc_json_tests.erl|   2 +
 src/couch/test/couch_file_tests.erl|   2 +-
 

[couchdb] branch add-shard-sync-api updated (e0ce19b -> 083881b)

2019-01-18 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch add-shard-sync-api
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


from e0ce19b  Merge branch 'master' into add-shard-sync-api
 new 5d219dd  Add PSE API to store opaque properties
 new 24a3698  Improve `couch_db:clustered_db` flexibility
 new 3ff043e  Implement `fabric_util:open_cluster_db`
 new 72eb129  Pass the DB record to index validation functions
 new 7bbe828  Validate design document options more strictly
 new 05678b9  Implement configurable hash functions
 new 25ac408  Implement partitioned dbs
 new 6edb9a5  Implement `couch_db:get_partition_info/2`
 new 3a1dd0a  Implement partitioned views
 new eb1ffcf  Optimize all_docs queries in a single partition
 new dc369e9  Optimize offset/limit for partition queries
 new 47efcbd  Use index names when testing index selection
 new 53d3515  Support partitioned queries in Mango
 new 16e6af4  Add Elixir tests for database partitions
 new 083881b  Merge branch 'master' into add-shard-sync-api

The 11549 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/chttpd/src/chttpd.erl  |   2 +
 src/chttpd/src/chttpd_db.erl   | 148 --
 src/chttpd/src/chttpd_httpd_handlers.erl   |   1 +
 src/chttpd/src/chttpd_show.erl |   2 +-
 src/chttpd/src/chttpd_view.erl |   8 +-
 .../test/chttpd_db_bulk_get_multipart_test.erl |  29 +-
 src/chttpd/test/chttpd_db_bulk_get_test.erl|  14 +-
 src/couch/src/couch_bt_engine.erl  |  98 +++-
 src/couch/src/couch_bt_engine_compactor.erl|   8 +-
 src/couch/src/couch_bt_engine_header.erl   |   3 +-
 src/couch/src/couch_btree.erl  |   6 +-
 src/couch/src/couch_db.erl |  68 ++-
 src/couch/src/couch_db_engine.erl  |  50 ++
 src/couch/src/couch_db_updater.erl |   9 +-
 src/couch/src/couch_ejson_compare.erl  |   4 +
 src/couch/src/couch_httpd.erl  |   2 +
 src/couch/src/couch_httpd_db.erl   |  44 +-
 src/couch/src/couch_partition.erl  | 164 ++
 src/couch/src/couch_server.erl |   4 +
 src/couch/test/couch_db_props_upgrade_tests.erl|  83 +++
 src/couch_index/src/couch_index_server.erl |   4 +-
 src/couch_mrview/include/couch_mrview.hrl  |   1 +
 src/couch_mrview/src/couch_mrview.erl  |  28 +-
 src/couch_mrview/src/couch_mrview_http.erl |   6 +-
 src/couch_mrview/src/couch_mrview_index.erl|  31 +-
 src/couch_mrview/src/couch_mrview_show.erl |   3 +-
 src/couch_mrview/src/couch_mrview_updater.erl  |  38 +-
 src/couch_mrview/src/couch_mrview_util.erl | 139 -
 src/fabric/src/fabric.erl  |  60 ++-
 src/fabric/src/fabric_db_create.erl|   7 +-
 src/fabric/src/fabric_db_info.erl  |  15 +-
 src/fabric/src/fabric_db_partition_info.erl|  99 
 src/fabric/src/fabric_doc_update.erl   |   8 +-
 src/fabric/src/fabric_rpc.erl  |  17 +-
 src/fabric/src/fabric_streams.erl  |   1 -
 src/fabric/src/fabric_util.erl |  45 +-
 src/fabric/src/fabric_view.erl |  51 +-
 src/fabric/src/fabric_view_all_docs.erl|  36 +-
 src/fabric/src/fabric_view_map.erl |  10 +-
 src/fabric/src/fabric_view_reduce.erl  |  10 +-
 src/mango/src/mango_cursor.erl |   1 +
 src/mango/src/mango_cursor_text.erl|   9 +
 src/mango/src/mango_cursor_view.erl|   6 +
 src/mango/src/mango_error.erl  |   7 +
 src/mango/src/mango_httpd.erl  |  23 +-
 src/mango/src/mango_idx.erl| 114 +++-
 src/mango/src/mango_idx.hrl|   1 +
 src/mango/src/mango_idx_text.erl   |   1 +
 src/mango/src/mango_idx_view.erl   |   1 +
 src/mango/src/mango_opts.erl   |  30 ++
 src/mango/test/05-index-selection-test.py  |  20 +-
 src/mango/test/user_docs.py|  37 +-
 src/mem3/src/mem3.erl  |  20 +-
 src/mem3/src/mem3_hash.erl |  73 +++
 src/mem3/src/mem3_shards.erl   |   4 +-
 src/mem3/src/mem3_util.erl |  21 +-
 .../test/mem3_hash_test.erl}   |  13 +-
 src/mem3/test/mem3_util_test.erl   |   8 -
 test/elixir/lib/couch/db_test.ex   |  12 +-
 

[couchdb] branch add-chttpd-stats updated (82580d4 -> 1f27026)

2019-01-18 Thread davisp
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a change to branch add-chttpd-stats
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 discard 82580d4  Implement customizable chttpd statistics
 discard 44eea83  Enforce partition size limits
 discard 848e893  Use an accumulator when merging revision trees
 discard 31a4a53  Add Elixir tests for database partitions
 discard 10348c3  Support partitioned queries in Mango
 discard c58cfd1  Use index names when testing index selection
 discard f9ad101  Optimize offset/limit for partition queries
 discard 724e772  Optimize all_docs queries in a single partition
 discard d6fe14b  Implement partitioned views
 discard 96efacc  Implement `couch_db:get_partition_info/2`
 discard 63b1505  Implement partitioned dbs
 discard cf886f5  Implement configurable hash functions
 discard a44fd72  Validate design document options more strictly
 discard f50da84  Pass the DB record to index validation functions
 discard 82696c7  Implement `fabric_util:open_cluster_db`
 discard 5f6a008  Improve `couch_db:clustered_db` flexibility
 discard 352bc80  Add PSE API to store opaque properties
 new 587d674  Fix end_time field in /_replicate response
 new c6b095b  Fix read repair in a mixed cluster environment
 new 38c1ab4  Improve vm.args template comments (#1861)
 new 5269d79  Fix fabric_open_doc_revs
 new 90d5bf6  Support one purge request with more than 100 docid
 new a3f99df  Merge pull request #1865 from 
apache/purge_request_with_101_docid
 new 1ee35e8  Move Jenkins to use Erlang 19 for initial build step (#1866)
 new 0f833fd  Fix timeout in chttpd_purge_tests
 new 5d219dd  Add PSE API to store opaque properties
 new 24a3698  Improve `couch_db:clustered_db` flexibility
 new 3ff043e  Implement `fabric_util:open_cluster_db`
 new 72eb129  Pass the DB record to index validation functions
 new 7bbe828  Validate design document options more strictly
 new 05678b9  Implement configurable hash functions
 new 25ac408  Implement partitioned dbs
 new 6edb9a5  Implement `couch_db:get_partition_info/2`
 new 3a1dd0a  Implement partitioned views
 new eb1ffcf  Optimize all_docs queries in a single partition
 new dc369e9  Optimize offset/limit for partition queries
 new 47efcbd  Use index names when testing index selection
 new 53d3515  Support partitioned queries in Mango
 new 16e6af4  Add Elixir tests for database partitions
 new aeb1ba4  Use an accumulator when merging revision trees
 new 8d2af71  Enforce partition size limits
 new 1f27026  Implement customizable chttpd statistics

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (82580d4)
\
 N -- N -- N   refs/heads/add-chttpd-stats (1f27026)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 11549 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:
 Jenkinsfile|   6 +-
 rel/overlay/etc/vm.args|  15 +-
 src/chttpd/src/chttpd.erl  |   4 +-
 src/chttpd/src/chttpd_db.erl   |  21 +-
 src/chttpd/test/chttpd_purge_tests.erl |  35 ++
 src/couch/src/couch_db_updater.erl |  27 +-
 src/couch_mrview/src/couch_mrview_updater.erl  |   9 +-
 .../src/couch_replicator_scheduler_job.erl |   4 +-
 src/fabric/src/fabric_doc_open.erl |   4 +-
 src/fabric/src/fabric_doc_open_revs.erl| 118 +--
 src/fabric/src/fabric_doc_purge.erl|   2 +-
 test/elixir/test/partition_all_docs_test.exs   | 118 +++
 test/elixir/test/partition_crud_test.exs   |  36 ++
 test/elixir/test/partition_ddoc_test.exs   | 171 ++
 test/elixir/test/partition_size_limit_test.exs | 305 +
 test/elixir/test/partition_size_test.exs   | 368 +
 test/elixir/test/partition_view_update_test.exs|  82 +
 17 files changed, 1202 insertions(+), 123 deletions(-)
 create mode 100644 test/elixir/test/partition_all_docs_test.exs
 create mode 100644 test/elixir/test/partition_ddoc_test.exs
 create mode 100644 test/elixir/test/partition_size_limit_test.exs



[couchdb] branch feature/database-partitions updated (51a482e -> 8cd68be)

2019-01-18 Thread davisp
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a change to branch feature/database-partitions
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 discard 51a482e  Add Elixir tests for database partitions
 discard 2f16d54  Support partitioned queries in Mango
 discard 8bc56f8  Use index names when testing index selection
 discard 391a0ed  Optimize offset/limit for partition queries
 discard e81ebc4  Optimize all_docs queries in a single partition
 discard 2d6dbf0  Implement partitioned views
 discard f12f382  Implement `couch_db:get_partition_info/2`
 discard f5a2cd4  Implement partitioned dbs
 discard c0468fe  Implement configurable hash functions
 discard 7762619  Validate design document options more strictly
 discard c30725d  Pass the DB record to index validation functions
 discard 1b1a6bb  Implement `fabric_util:open_cluster_db`
 discard dbbbc65  Improve `couch_db:clustered_db` flexibility
 discard aa32cb6  Add PSE API to store opaque properties
 new 90d5bf6  Support one purge request with more than 100 docid
 new a3f99df  Merge pull request #1865 from 
apache/purge_request_with_101_docid
 new 1ee35e8  Move Jenkins to use Erlang 19 for initial build step (#1866)
 new fae1207  Add PSE API to store opaque properties
 new e9024bf  Improve `couch_db:clustered_db` flexibility
 new 9872652  Implement `fabric_util:open_cluster_db`
 new 9c48da4  Pass the DB record to index validation functions
 new 79b90f5  Validate design document options more strictly
 new 4355825  Implement configurable hash functions
 new ebd9211  Implement partitioned dbs
 new dfa98b4  Implement `couch_db:get_partition_info/2`
 new 08a087a  Implement partitioned views
 new 23ab71a  Optimize all_docs queries in a single partition
 new 095392a  Optimize offset/limit for partition queries
 new 3cac240  Use index names when testing index selection
 new 43cf384  Support partitioned queries in Mango
 new 8cd68be  Add Elixir tests for database partitions

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (51a482e)
\
 N -- N -- N   refs/heads/feature/database-partitions (8cd68be)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 11545 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:
 Jenkinsfile|  6 +++---
 src/chttpd/test/chttpd_purge_tests.erl | 21 +
 src/fabric/src/fabric_doc_purge.erl|  2 +-
 3 files changed, 25 insertions(+), 4 deletions(-)



[couchdb] branch add-shard-sync-api updated: Fix timeout in chttpd_purge_tests

2019-01-18 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch add-shard-sync-api
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/add-shard-sync-api by this 
push:
 new 0f833fd  Fix timeout in chttpd_purge_tests
 new c25fd2e  Merge branch 'master' into add-shard-sync-api
0f833fd is described below

commit 0f833fd0c20ba0227028776c398ccd8cd13b93b3
Author: Paul J. Davis 
AuthorDate: Fri Jan 18 10:52:24 2019 -0600

Fix timeout in chttpd_purge_tests
---
 src/chttpd/test/chttpd_purge_tests.erl | 36 +++---
 1 file changed, 25 insertions(+), 11 deletions(-)

diff --git a/src/chttpd/test/chttpd_purge_tests.erl 
b/src/chttpd/test/chttpd_purge_tests.erl
index 50f7e18..dbd73de 100644
--- a/src/chttpd/test/chttpd_purge_tests.erl
+++ b/src/chttpd/test/chttpd_purge_tests.erl
@@ -52,6 +52,11 @@ create_doc(Url, Id, Content) ->
 [?CONTENT_JSON, ?AUTH], "{\"mr\": \"" ++ Content ++ "\"}").
 
 
+create_docs(Url, Docs) ->
+test_request:post(Url ++ "/_bulk_docs",
+[?CONTENT_JSON, ?AUTH], ?JSON_ENCODE({[{docs, Docs}]})).
+
+
 delete_db(Url) ->
 {ok, 200, _, _} = test_request:delete(Url, [?AUTH]).
 
@@ -141,20 +146,29 @@ test_ok_purge_request(Url) ->
 test_ok_purge_request_with_101_docid(Url) ->
 ?_test(begin
 PurgedDocsNum = 101,
-IdsRevsEJson = lists:foldl(fun(I, CIdRevs) ->
+Docs = lists:foldl(fun(I, Acc) ->
 Id = list_to_binary(integer_to_list(I)),
-{ok, _, _, Body} = create_doc(Url, Id),
-{Json} = ?JSON_DECODE(Body),
-Rev = couch_util:get_value(<<"rev">>, Json, undefined),
-[{Id, [Rev]} | CIdRevs]
- end, [], lists:seq(1, PurgedDocsNum)),
+Doc = {[{<<"_id">>, Id}, {value, I}]},
+[Doc | Acc]
+end, [], lists:seq(1, PurgedDocsNum)),
+
+{ok, _, _, Body} = create_docs(Url, Docs),
+BodyJson = ?JSON_DECODE(Body),
+
+PurgeBody = lists:map(fun({DocResp}) ->
+Id = couch_util:get_value(<<"id">>, DocResp, undefined),
+Rev = couch_util:get_value(<<"rev">>, DocResp, undefined),
+{Id, [Rev]}
+end, BodyJson),
 
-IdsRevs = binary_to_list(?JSON_ENCODE({IdsRevsEJson})),
 ok = config:set("purge", "max_document_id_number", "101"),
-{ok, Status, _, _} = test_request:post(Url ++ "/_purge/",
-[?CONTENT_JSON, ?AUTH], IdsRevs),
-ok = config:delete("purge", "max_document_id_number"),
-?assert(Status =:= 201 orelse Status =:= 202)
+try
+{ok, Status, _, _} = test_request:post(Url ++ "/_purge/",
+[?CONTENT_JSON, ?AUTH], ?JSON_ENCODE({PurgeBody})),
+?assert(Status =:= 201 orelse Status =:= 202)
+after
+ok = config:delete("purge", "max_document_id_number")
+end
 end).
 
 



[couchdb-documentation] branch master updated: Improve placement docs, closes #374 (#376)

2019-01-18 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 2a7418c  Improve placement docs, closes #374 (#376)
2a7418c is described below

commit 2a7418cfe01e43bbfa5e9cb6fa3725096fb9a4be
Author: Joan Touzet 
AuthorDate: Fri Jan 18 23:56:50 2019 -0500

Improve placement docs, closes #374 (#376)

Closes #374 .
---
 src/cluster/databases.rst | 5 +
 src/cluster/sharding.rst  | 8 
 src/config/cluster.rst| 5 +
 3 files changed, 18 insertions(+)

diff --git a/src/cluster/databases.rst b/src/cluster/databases.rst
index f008eb6..09876d0 100644
--- a/src/cluster/databases.rst
+++ b/src/cluster/databases.rst
@@ -51,6 +51,11 @@ In BigCouch, the predecessor to CouchDB 2.0's clustering 
functionality, there
 was the concept of zones. CouchDB 2.0 carries this forward with cluster
 placement rules.
 
+.. warning::
+
+Use of the ``placement`` argument will **override** the standard
+logic for shard replica cardinality (specified by ``[cluster] n``.)
+
 First, each node must be labeled with a zone attribute. This defines which
 zone each node is in. You do this by editing the node's document in the
 ``/nodes`` database, which is accessed through the "back-door" (5986) port.
diff --git a/src/cluster/sharding.rst b/src/cluster/sharding.rst
index aeb8d02..cc7268e 100644
--- a/src/cluster/sharding.rst
+++ b/src/cluster/sharding.rst
@@ -468,6 +468,11 @@ Specifying database placement
 You can configure CouchDB to put shard replicas on certain nodes at
 database creation time using placement rules.
 
+.. warning::
+
+Use of the ``placement`` option will **override** the ``n`` option,
+both in the ``.ini`` file as well as when specified in a ``URL``.
+
 First, each node must be labeled with a zone attribute. This defines
 which zone each node is in. You do this by editing the node’s document
 in the ``/_nodes`` database, which is accessed through the node-local
@@ -509,6 +514,9 @@ when the database is created, using the same syntax as the 
ini file:
 
 curl -X PUT $COUCH_URL:5984/?zone=
 
+The ``placement`` argument may also be specified. Note that this *will*
+override the logic that determines the number of created replicas!
+
 Note that you can also use this system to ensure certain nodes in the
 cluster do not host any replicas for newly created databases, by giving
 them a zone attribute that does not appear in the ``[cluster]``
diff --git a/src/config/cluster.rst b/src/config/cluster.rst
index 969f7e2..a7d605f 100644
--- a/src/config/cluster.rst
+++ b/src/config/cluster.rst
@@ -56,6 +56,11 @@ Cluster Options
 
 .. config:option:: placement
 
+.. warning::
+
+Use of this option will **override** the ``n`` option for replica
+cardinality. Use with care.
+
 Sets the cluster-wide replica placement policy when creating new
 databases. The value must be a comma-delimited list of strings of the
 format ``zone_name:#``, where ``zone_name`` is a zone as specified in



[couchdb-documentation] branch 374-clarify-placement deleted (was bf7f5b0)

2019-01-18 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch 374-clarify-placement
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git.


 was bf7f5b0  Merge branch 'master' into 374-clarify-placement

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[couchdb-documentation] branch 374-clarify-placement updated: Improve node naming docs for cluster setup (#377)

2019-01-18 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch 374-clarify-placement
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git


The following commit(s) were added to refs/heads/374-clarify-placement by this 
push:
 new 2d6c5c0  Improve node naming docs for cluster setup (#377)
 new bf7f5b0  Merge branch 'master' into 374-clarify-placement
2d6c5c0 is described below

commit 2d6c5c039fb815d01447674fc914fdc669275731
Author: Joan Touzet 
AuthorDate: Tue Jan 15 13:36:45 2019 -0500

Improve node naming docs for cluster setup (#377)
---
 src/setup/cluster.rst | 44 ++--
 1 file changed, 26 insertions(+), 18 deletions(-)

diff --git a/src/setup/cluster.rst b/src/setup/cluster.rst
index ce80bc6..b73b35f 100644
--- a/src/setup/cluster.rst
+++ b/src/setup/cluster.rst
@@ -86,7 +86,7 @@ Configure and Test the Communication with Erlang
 Make CouchDB use correct IP|FQDN and the open ports
 
 
-In file ``etc/vm.args`` change the line ``-name couchdb@127.0.0.1`` to
+In file ``etc/vm.args`` change the line ``-name couchdb@127.0.0.1`` to
 ``-name couchdb@`` which 
defines
 the name of the node. Each node must have an identifier that allows remote
 systems to talk to it. The node name is of the form
@@ -102,6 +102,12 @@ the node's IP address. The FQDN is preferred so that you 
can renumber the node's
 IP address without disruption to the cluster. (This is common in cloud-hosted
 environments.)
 
+.. warning::
+
+Tricks with ``/etc/hosts`` and ``libresolv`` don't work with Erlang.
+Either properly set up DNS and use fully-qualified domain names, or
+use IP addresses. DNS and FQDNs are preferred.
+
 Open ``etc/vm.args``, on all nodes, and add ``-kernel inet_dist_listen_min 
9100``
 and ``-kernel inet_dist_listen_max 9200`` like below:
 
@@ -120,15 +126,16 @@ Confirming connectivity between nodes
 -
 
 For this test, you need 2 servers with working hostnames. Let us call them
-server1 and server2.
+server1.test.com and server2.test.com. They reside at ``192.168.0.1`` and
+``192.168.0.2``, respectively.
 
-On server1:
+On server1.test.com:
 
 .. code-block:: bash
 
 erl -name bus@192.168.0.1 -setcookie 'brumbrum' -kernel 
inet_dist_listen_min 9100 -kernel inet_dist_listen_max 9200
 
-Then on server2:
+Then on server2.test.com:
 
 .. code-block:: bash
 
@@ -150,9 +157,10 @@ In shell1:
 
 .. code-block:: erlang
 
-net_kernel:connect_node(car@server2).
+net_kernel:connect_node(car@192.168.0.2).
 
-This will connect to the node called ``car`` on the server called ``server2``.
+This will connect to the node called ``car`` on the server called
+``192.168.0.2``.
 
 If that returns true, then you have an Erlang cluster, and the firewalls are
 open. This means that 2 CouchDB nodes on these two servers will be able to
@@ -260,14 +268,14 @@ should show all of the nodes in your cluster:
 
 {
   "all_nodes": [
-"couchdb@server1",
-"couchdb@server2",
-"couchdb@server3"
+"couc...@server1.test.com",
+"couc...@server2.test.com",
+"couc...@server3.test.com"
   ],
   "cluster_nodes": [
-"couchdb@server1",
-"couchdb@server2",
-"couchdb@server3"
+"couc...@server1.test.com",
+"couc...@server2.test.com",
+"couc...@server3.test.com"
   ]
 }
 
@@ -345,14 +353,14 @@ Response:
 
 {
 "all_nodes": [
-"couchdb@couch1",
-"couchdb@couch2",
-"couchdb@couch3",
+"couc...@couch1.test.com",
+"couc...@couch2.test.com",
+"couc...@couch3.test.com",
 ],
 "cluster_nodes": [
-"couchdb@couch1",
-"couchdb@couch2",
-"couchdb@couch3",
+"couc...@couch1.test.com",
+"couc...@couch2.test.com",
+"couc...@couch3.test.com",
 ]
 }
 



[couchdb-documentation] branch shard-level-docs updated: Improve placement docs, closes #374 (#376)

2019-01-18 Thread wohali
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch shard-level-docs
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git


The following commit(s) were added to refs/heads/shard-level-docs by this push:
 new 2a7418c  Improve placement docs, closes #374 (#376)
 new 306d961  Merge branch 'master' into shard-level-docs
2a7418c is described below

commit 2a7418cfe01e43bbfa5e9cb6fa3725096fb9a4be
Author: Joan Touzet 
AuthorDate: Fri Jan 18 23:56:50 2019 -0500

Improve placement docs, closes #374 (#376)

Closes #374 .
---
 src/cluster/databases.rst | 5 +
 src/cluster/sharding.rst  | 8 
 src/config/cluster.rst| 5 +
 3 files changed, 18 insertions(+)

diff --git a/src/cluster/databases.rst b/src/cluster/databases.rst
index f008eb6..09876d0 100644
--- a/src/cluster/databases.rst
+++ b/src/cluster/databases.rst
@@ -51,6 +51,11 @@ In BigCouch, the predecessor to CouchDB 2.0's clustering 
functionality, there
 was the concept of zones. CouchDB 2.0 carries this forward with cluster
 placement rules.
 
+.. warning::
+
+Use of the ``placement`` argument will **override** the standard
+logic for shard replica cardinality (specified by ``[cluster] n``.)
+
 First, each node must be labeled with a zone attribute. This defines which
 zone each node is in. You do this by editing the node's document in the
 ``/nodes`` database, which is accessed through the "back-door" (5986) port.
diff --git a/src/cluster/sharding.rst b/src/cluster/sharding.rst
index aeb8d02..cc7268e 100644
--- a/src/cluster/sharding.rst
+++ b/src/cluster/sharding.rst
@@ -468,6 +468,11 @@ Specifying database placement
 You can configure CouchDB to put shard replicas on certain nodes at
 database creation time using placement rules.
 
+.. warning::
+
+Use of the ``placement`` option will **override** the ``n`` option,
+both in the ``.ini`` file as well as when specified in a ``URL``.
+
 First, each node must be labeled with a zone attribute. This defines
 which zone each node is in. You do this by editing the node’s document
 in the ``/_nodes`` database, which is accessed through the node-local
@@ -509,6 +514,9 @@ when the database is created, using the same syntax as the 
ini file:
 
 curl -X PUT $COUCH_URL:5984/?zone=
 
+The ``placement`` argument may also be specified. Note that this *will*
+override the logic that determines the number of created replicas!
+
 Note that you can also use this system to ensure certain nodes in the
 cluster do not host any replicas for newly created databases, by giving
 them a zone attribute that does not appear in the ``[cluster]``
diff --git a/src/config/cluster.rst b/src/config/cluster.rst
index 969f7e2..a7d605f 100644
--- a/src/config/cluster.rst
+++ b/src/config/cluster.rst
@@ -56,6 +56,11 @@ Cluster Options
 
 .. config:option:: placement
 
+.. warning::
+
+Use of this option will **override** the ``n`` option for replica
+cardinality. Use with care.
+
 Sets the cluster-wide replica placement policy when creating new
 databases. The value must be a comma-delimited list of strings of the
 format ``zone_name:#``, where ``zone_name`` is a zone as specified in