You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2017/10/04 13:48:26 UTC
[couchdb] branch 749-fix-couch_peruser-app-structure updated
(910741f -> 2c12ecd)
This is an automated email from the ASF dual-hosted git repository.
jan pushed a change to branch 749-fix-couch_peruser-app-structure
in repository https://gitbox.apache.org/repos/asf/couchdb.git.
omit 910741f feat: mango test runner: do not rely on timeout for CouchDB start alone
omit 863e8fd Start and stop couch_peruser in the test suite
omit 6fb8b75 Make couch_peruser a proper Erlang app
add d46e3ee Update README Jenkins link and minor misc. cleanup
add 50afcce Use fully qualified call to allow code upgrade
add 7ab4f91 Merge pull request #762 from cloudant/allow-code-upgrade-for-rexi_monitor
add 224a2d8 remove commented out code (#766)
add 2fc328e Prevent custom test config from persisting
add 6e57c43 Removing Dockerfile in favour of apache/couchdb-docker repo
add 4796ea7 Fix chttpd's tests warnings (#771)
add e2037dc Avoid race condition in couch_mrview_ddoc_updated_tests (#764)
add 83a5ac5 Cleanup mango test runner script
add f8aee3a Add a debugging utilities for listing processes
add b710eca Add help function
add 60a8560 Rename functions to clarify they work on tree
add 9ac4aca Remove ps function
add 9b56fef Fix double mention of link_tree in help
add db0be08 Add few tests
add f7dac72 Remove dependency on proper
add 97b3626 ps is gone
add 5982428 Fix typos in help
add c47f051 Fix copy/paste error spawn -> spawn_link
add f3f0899 Add comment about structure of TableSpec
add 87c40b9 Fix tree generation in tests
add 64a48ba Merge pull request #761 from cloudant/print-linked-processes2
add af839e1 basic execution statistics for _find (#768)
add f6f5ff7 Fix Jenkins build - always pull latest pkg img
add 1bbb244 Remove copy/paste error in jenkinsfile
add ad29220 include mrview options in _explain result
add 3d0e4f4 Merge pull request #765 from willholley/mango_explain_view_parameters
add d3c8d41 Pass user ctx when opening a doc in show handler
add 7284b68 Improve Mango operator tests (#792)
add ff6e576 Allow library object in other design doc sections besides views
add 1091b5a Implement attachment size limits
add aa14e5d Query operator tests for multiple index types (#800)
add 04e4cfa Avoid duplicate index selection in Mango
add bc43efb Use unittest assert in index selection tests
add 41e2984 Use unittest assertions in mango index tests
add 302126b Return 400 when no index can fulfil a sort
add cf00dc2 Log unhandled mango errors
add ef8a934 Do not crash when free space cannot be calculated (#803)
add d9e2940 Provide a more accurate size check for max_document_size limit
add c622e17 Don't reset logs when JS tests restart the server
add ed6ec66 Add selector support for json indexes (#808)
add 369b442 Catch invalid base64 in inline attachments
add 190ee30 Merge pull request #817 from cloudant/issue-784-fix-invalid-base64-att-crash
add e590cad Support setting cookie domain for auth
add cacc774 Add unit tests for cookie domain
add c531a13 Fix replication ID parsing in URL paths
add dae81be Fix json index selection (#816)
add e474da0 Run mango tests with make check (#786)
add 00df0de Rename selector to partialfilterselector in indexes (#818)
add 8d1c704 Avoid decompressing just to calculate external size
add 1eaf178 Do not buffer rexi messages to disconnected nodes
add 3b8b9a3 Make stats interval into config parameter (#830)
add 32ccd1b Add cluster info to db_info (#837)
add 7267f92 Reduce replicator.retries_per_request value from 10 to 5
add 7c3cf50 Reorganize exports from couch_db.erl
add 20a1021 Move calculate_start_seq and owner_of
add 35fcd7e Update couch_server to not use the db record
add 98eda03 Add a test helper for creating fake db records
add 5530204 Avoid bad match on really old databases
add aee57bf Remove public access to the db record
add cb610bf Add clause for mixed cluster upgrades
add d5a261b Allow for mixed db record definitions
add c07f3f5 Handle attachments downgrades in a mixed cluster environment
add 355f0fc fix tests to be compatible for both python2 and python3 (#839)
add 30fcd7b Add convenience remsh bash script
add 2684561 Clean up replicator logs
add b756b77 Replace replication start multi-line log statement
add 3e6432c Remove bashisms in remsh script
add 7c49f25 fix remsh refactoring bug
add d04038a Merge pull request #847 from apache/add-remsh
add 9751b06 Update meck to latest version 0.8.8
add 796e1b0 Merge branch 'master' into master
add 0eb7677 Support setting cookie domain for AuthSession cookie
add 262c527 add spidermonkey to README-DEV instructions for mac
add 8b8de97 add sphinx_rtd_theme
add 59effcf Merge pull request #853 from apache/fix/docs-mac-spidermonkey
add 6bff5fb Replace deprecated crypto:rand_bytes call
new 52f9499 Make couch_peruser a proper Erlang app
new 4ab3da9 Start and stop couch_peruser in the test suite
new 2c12ecd feat: mango test runner: do not rely on timeout for CouchDB start alone
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 (910741f)
\
N -- N -- N refs/heads/749-fix-couch_peruser-app-structure (2c12ecd)
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 3 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 +-
BUGS.md | 7 +-
COMMITTERS.md | 2 -
Dockerfile | 36 --
Jenkinsfile | 92 ++--
Makefile | 1 +
README-DEV.rst | 35 +-
README.rst | 4 +-
configure | 2 +-
dev/run | 8 +-
rebar.config.script | 4 +-
rel/overlay/bin/remsh | 76 +++
rel/overlay/etc/default.ini | 22 +-
src/chttpd/src/chttpd.erl | 2 +
src/chttpd/src/chttpd_db.erl | 21 +-
src/chttpd/src/chttpd_external.erl | 22 +-
src/chttpd/src/chttpd_show.erl | 16 +-
.../test/chttpd_db_attachment_size_tests.erl | 206 ++++++++
src/chttpd/test/chttpd_db_doc_size_tests.erl | 77 +--
src/chttpd/test/chttpd_open_revs_error_test.erl | 12 +-
src/chttpd/test/chttpd_security_tests.erl | 5 +-
src/couch/include/couch_db.hrl | 34 +-
src/couch/src/couch_att.erl | 93 +++-
src/couch/src/couch_auth_cache.erl | 14 +-
src/couch/src/couch_changes.erl | 56 +--
src/couch/src/couch_compaction_daemon.erl | 48 +-
src/couch/src/couch_compress.erl | 14 +
src/couch/src/couch_db.erl | 307 ++++++++++--
src/couch/src/couch_db_int.hrl | 93 ++++
src/couch/src/couch_db_plugin.erl | 6 +-
src/couch/src/couch_db_updater.erl | 10 +-
src/couch/src/couch_debug.erl | 517 +++++++++++++++++++++
src/couch/src/couch_doc.erl | 26 +-
src/couch/src/couch_ejson_size.erl | 99 ++++
src/couch/src/couch_httpd.erl | 4 +
src/couch/src/couch_httpd_auth.erl | 9 +-
src/couch/src/couch_httpd_db.erl | 12 +-
src/couch/src/couch_lru.erl | 9 +-
src/couch/src/couch_server.erl | 135 +++---
.../rexi.hrl => couch/src/couch_server_int.hrl} | 17 +-
src/couch/src/couch_users_db.erl | 8 +-
src/couch/src/couch_util.erl | 15 +-
src/couch/src/test_util.erl | 14 +
src/couch/test/couch_auth_cache_tests.erl | 2 +-
src/couch/test/couch_changes_tests.erl | 2 +-
src/couch/test/couch_compress_tests.erl | 11 +
src/couch/test/couch_db_plugin_tests.erl | 13 +-
src/couch/test/couch_doc_tests.erl | 1 +
src/couch/test/couch_ejson_size_tests.erl | 72 +++
src/couch/test/couch_server_tests.erl | 11 +-
src/couch/test/couchdb_attachments_tests.erl | 132 ++++++
src/couch/test/couchdb_compaction_daemon_tests.erl | 4 +-
src/couch/test/couchdb_cookie_domain_tests.erl | 77 +++
src/couch/test/couchdb_file_compression_tests.erl | 2 +-
src/couch/test/couchdb_views_tests.erl | 25 +-
src/couch_index/src/couch_index_server.erl | 15 +-
src/couch_index/src/couch_index_util.erl | 2 +-
.../test/couch_index_compaction_tests.erl | 3 +-
.../test/couch_index_ddoc_updated_tests.erl | 2 +-
src/couch_mrview/src/couch_mrview.erl | 26 +-
src/couch_mrview/src/couch_mrview_compactor.erl | 3 +-
src/couch_mrview/src/couch_mrview_http.erl | 10 +-
src/couch_mrview/src/couch_mrview_show.erl | 16 +-
.../test/couch_mrview_all_docs_tests.erl | 2 +-
.../test/couch_mrview_changes_since_tests.erl | 2 +-
.../test/couch_mrview_collation_tests.erl | 2 +-
.../test/couch_mrview_compact_tests.erl | 2 +-
.../test/couch_mrview_ddoc_updated_tests.erl | 10 +-
.../test/couch_mrview_ddoc_validation_tests.erl | 61 ++-
.../test/couch_mrview_index_changes_tests.erl | 2 +-
.../test/couch_mrview_index_info_tests.erl | 2 +-
.../test/couch_mrview_local_docs_tests.erl | 2 +-
.../test/couch_mrview_map_views_tests.erl | 2 +-
.../test/couch_mrview_red_views_tests.erl | 2 +-
.../src/couch_replicator_api_wrap.erl | 31 +-
.../src/couch_replicator_api_wrap.hrl | 2 +-
.../src/couch_replicator_clustering.erl | 116 ++---
src/couch_replicator/src/couch_replicator_docs.erl | 19 +-
src/couch_replicator/src/couch_replicator_ids.erl | 16 +-
.../src/couch_replicator_scheduler_job.erl | 200 ++++++--
.../src/couch_replicator_utils.erl | 37 +-
.../src/couch_replicator_worker.erl | 56 ++-
... => couch_replicator_attachments_too_large.erl} | 36 +-
.../test/couch_replicator_compact_tests.erl | 27 +-
src/couch_stats/src/couch_stats.app.src | 4 +-
src/couch_stats/src/couch_stats.erl | 6 +-
.../src/couch_stats.hrl} | 5 +-
src/couch_stats/src/couch_stats_aggregator.erl | 11 +-
src/ddoc_cache/test/ddoc_cache_refresh_test.erl | 4 +-
src/fabric/include/couch_db_tmp.hrl | 296 ------------
src/fabric/rebar.config | 2 +-
src/fabric/src/fabric.erl | 12 +-
src/fabric/src/fabric_db_info.erl | 48 +-
src/fabric/src/fabric_doc_attachments.erl | 28 +-
src/fabric/src/fabric_doc_update.erl | 4 +-
src/fabric/src/fabric_rpc.erl | 123 +----
src/fabric/src/fabric_util.erl | 3 +-
src/mango/src/mango_crud.erl | 2 +-
src/mango/src/mango_cursor.erl | 31 +-
src/mango/src/mango_cursor.hrl | 4 +
src/mango/src/mango_cursor_text.erl | 44 +-
src/mango/src/mango_cursor_view.erl | 88 ++--
src/mango/src/mango_error.erl | 6 +-
src/mango/src/mango_execution_stats.erl | 89 ++++
.../src/mango_execution_stats.hrl} | 9 +-
src/mango/src/mango_httpd.erl | 34 +-
src/mango/src/mango_idx.erl | 74 ++-
src/mango/src/mango_idx_text.erl | 17 +-
src/mango/src/mango_idx_view.erl | 17 +-
src/mango/src/mango_native_proc.erl | 49 +-
src/mango/src/mango_opts.erl | 6 +
src/mango/src/mango_selector.erl | 110 ++++-
src/mango/test/01-index-crud-test.py | 21 +-
src/mango/test/02-basic-find-test.py | 27 +-
src/mango/test/03-operator-test.py | 159 ++++++-
src/mango/test/05-index-selection-test.py | 116 ++++-
src/mango/test/06-basic-text-test.py | 3 -
src/mango/test/07-text-custom-field-list-test.py | 4 +-
src/mango/test/08-text-limit-test.py | 6 +-
src/mango/test/09-text-sort-test.py | 4 +-
src/mango/test/12-use-correct-index.py | 19 +-
src/mango/test/14-json-pagination.py | 4 +-
src/mango/test/15-execution-stats-test.py | 58 +++
src/mango/test/16-index-selectors.py | 237 ++++++++++
src/mango/test/mango.py | 33 +-
src/mango/test/user_docs.py | 30 +-
src/mem3/src/mem3.erl | 17 +-
src/mem3/src/mem3_cluster.erl | 161 +++++++
src/mem3/src/mem3_httpd.erl | 4 +-
src/mem3/src/mem3_nodes.erl | 10 +-
src/mem3/src/mem3_rep.erl | 15 +-
src/mem3/src/mem3_rpc.erl | 4 +-
src/mem3/src/mem3_shards.erl | 10 +-
src/mem3/test/mem3_cluster_test.erl | 133 ++++++
src/rexi/src/rexi_monitor.erl | 3 +-
src/rexi/src/rexi_server_mon.erl | 84 +++-
test/build/test-run-couch-for-mango.sh | 2 +-
test/javascript/tests/attachments.js | 18 +
test/javascript/tests/users_db_security.js | 46 ++
139 files changed, 4229 insertions(+), 1375 deletions(-)
delete mode 100644 Dockerfile
create mode 100755 rel/overlay/bin/remsh
create mode 100644 src/chttpd/test/chttpd_db_attachment_size_tests.erl
create mode 100644 src/couch/src/couch_db_int.hrl
create mode 100644 src/couch/src/couch_ejson_size.erl
copy src/{rexi/include/rexi.hrl => couch/src/couch_server_int.hrl} (83%)
create mode 100644 src/couch/test/couch_ejson_size_tests.erl
create mode 100755 src/couch/test/couchdb_cookie_domain_tests.erl
copy src/couch_replicator/test/{couch_replicator_id_too_long_tests.erl => couch_replicator_attachments_too_large.erl} (73%)
copy src/{couch_replicator/src/couch_replicator_scheduler.hrl => couch_stats/src/couch_stats.hrl} (89%)
delete mode 100644 src/fabric/include/couch_db_tmp.hrl
create mode 100644 src/mango/src/mango_execution_stats.erl
copy src/{couch_epi/src/couch_epi.hrl => mango/src/mango_execution_stats.hrl} (74%)
create mode 100644 src/mango/test/15-execution-stats-test.py
create mode 100644 src/mango/test/16-index-selectors.py
create mode 100644 src/mem3/src/mem3_cluster.erl
create mode 100644 src/mem3/test/mem3_cluster_test.erl
--
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <co...@couchdb.apache.org>'].
[couchdb] 01/03: Make couch_peruser a proper Erlang app
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jan pushed a commit to branch 749-fix-couch_peruser-app-structure
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 52f94991465f441eb44e704a75dbf6c2e9b30f96
Author: Russell Branca <ch...@apache.org>
AuthorDate: Thu Aug 17 17:21:35 2017 +0000
Make couch_peruser a proper Erlang app
---
rel/overlay/etc/default.ini | 1 -
src/couch_peruser/src/couch_peruser.app.src | 5 ++++-
...couch_peruser.app.src => couch_peruser_app.erl} | 22 +++++++++++++------
...couch_peruser.app.src => couch_peruser_sup.erl} | 25 ++++++++++++++++------
4 files changed, 37 insertions(+), 16 deletions(-)
diff --git a/rel/overlay/etc/default.ini b/rel/overlay/etc/default.ini
index 1228535..56f9147 100644
--- a/rel/overlay/etc/default.ini
+++ b/rel/overlay/etc/default.ini
@@ -254,7 +254,6 @@ uuids={couch_uuids, start, []}
auth_cache={couch_auth_cache, start_link, []}
os_daemons={couch_os_daemons, start_link, []}
compaction_daemon={couch_compaction_daemon, start_link, []}
-couch_peruser={couch_peruser, start_link, []}
[mango]
; Set to true to disable the "index all fields" text index, which can lead
diff --git a/src/couch_peruser/src/couch_peruser.app.src b/src/couch_peruser/src/couch_peruser.app.src
index fb6d45b..777446d 100644
--- a/src/couch_peruser/src/couch_peruser.app.src
+++ b/src/couch_peruser/src/couch_peruser.app.src
@@ -14,5 +14,8 @@
{description, "couch_peruser - maintains per-user databases in CouchDB"},
{vsn, git},
{registered, []},
- {applications, [kernel, stdlib, config, couch, fabric]}
+ {applications, [kernel, stdlib, config, couch, fabric]},
+ {mod, {couch_peruser_app, []}},
+ {env, []},
+ {modules, [couch_peruser, couch_peruser_app, couch_peruser_sup]}
]}.
diff --git a/src/couch_peruser/src/couch_peruser.app.src b/src/couch_peruser/src/couch_peruser_app.erl
similarity index 65%
copy from src/couch_peruser/src/couch_peruser.app.src
copy to src/couch_peruser/src/couch_peruser_app.erl
index fb6d45b..770c082 100644
--- a/src/couch_peruser/src/couch_peruser.app.src
+++ b/src/couch_peruser/src/couch_peruser_app.erl
@@ -2,7 +2,7 @@
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
-% http://www.apache.org/licenses/LICENSE-2.0
+% http://www.apache.org/licenses/LICENSE-2.0
%
% Unless required by applicable law or agreed to in writing, software
% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
@@ -10,9 +10,17 @@
% License for the specific language governing permissions and limitations under
% the License.
-{application, couch_peruser, [
- {description, "couch_peruser - maintains per-user databases in CouchDB"},
- {vsn, git},
- {registered, []},
- {applications, [kernel, stdlib, config, couch, fabric]}
-]}.
+-module(couch_peruser_app).
+
+-behaviour(application).
+
+-export([start/2, stop/1]).
+
+
+start(_Type, _StartArgs) ->
+ couch_peruser_sup:start_link().
+
+
+stop(_State) ->
+ ok.
+
diff --git a/src/couch_peruser/src/couch_peruser.app.src b/src/couch_peruser/src/couch_peruser_sup.erl
similarity index 53%
copy from src/couch_peruser/src/couch_peruser.app.src
copy to src/couch_peruser/src/couch_peruser_sup.erl
index fb6d45b..b89a363 100644
--- a/src/couch_peruser/src/couch_peruser.app.src
+++ b/src/couch_peruser/src/couch_peruser_sup.erl
@@ -2,7 +2,7 @@
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
-% http://www.apache.org/licenses/LICENSE-2.0
+% http://www.apache.org/licenses/LICENSE-2.0
%
% Unless required by applicable law or agreed to in writing, software
% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
@@ -10,9 +10,20 @@
% License for the specific language governing permissions and limitations under
% the License.
-{application, couch_peruser, [
- {description, "couch_peruser - maintains per-user databases in CouchDB"},
- {vsn, git},
- {registered, []},
- {applications, [kernel, stdlib, config, couch, fabric]}
-]}.
+-module(couch_peruser_sup).
+
+-behaviour(supervisor).
+
+-export([start_link/0, init/1]).
+
+%% Helper macro for declaring children of supervisor
+-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
+
+
+start_link() ->
+ supervisor:start_link({local, ?MODULE}, ?MODULE, []).
+
+
+init([]) ->
+ {ok, { {one_for_one, 5, 10}, [?CHILD(couch_peruser, worker)]}}.
+
--
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.
[couchdb] 03/03: feat: mango test runner: do not rely on timeout
for CouchDB start alone
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jan pushed a commit to branch 749-fix-couch_peruser-app-structure
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 2c12ecd71dfacb927d633e9f5a0c4dc05af80619
Author: Jan Lehnardt <ja...@apache.org>
AuthorDate: Sun Oct 1 13:14:43 2017 +0200
feat: mango test runner: do not rely on timeout for CouchDB start alone
On slow build nodes, 10 seconds might not be enough of a wait.
---
test/build/test-run-couch-for-mango.sh | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/test/build/test-run-couch-for-mango.sh b/test/build/test-run-couch-for-mango.sh
index 6034a79..0597a8f 100755
--- a/test/build/test-run-couch-for-mango.sh
+++ b/test/build/test-run-couch-for-mango.sh
@@ -13,8 +13,17 @@
./dev/run -n 1 --admin=testuser:testpass &
export SERVER_PID=$!
-sleep 10
-curl http://dev:15984
+
+COUCH_STARTED=-1
+while ( [ $COUCH_STARTED -ne 0 ] ); do
+ curl -s http://127.0.0.1:15984
+ COUCH_STARTED=$?
+ if [ $COUCH_STARTED -ne 0 ]; then
+ # do not wait another 5 seconds if couch started now
+ sleep 5
+ fi
+done
+
cd src/mango/
nosetests
--
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.
[couchdb] 02/03: Start and stop couch_peruser in the test suite
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jan pushed a commit to branch 749-fix-couch_peruser-app-structure
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 4ab3da9cc9e5d51b39ad1f66367c1fe167c27c17
Author: Russell Branca <ch...@apache.org>
AuthorDate: Thu Aug 17 19:40:38 2017 +0000
Start and stop couch_peruser in the test suite
---
src/couch_peruser/test/couch_peruser_test.erl | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/couch_peruser/test/couch_peruser_test.erl b/src/couch_peruser/test/couch_peruser_test.erl
index c6fde03..f7ef8cd 100644
--- a/src/couch_peruser/test/couch_peruser_test.erl
+++ b/src/couch_peruser/test/couch_peruser_test.erl
@@ -20,12 +20,14 @@
setup_all() ->
TestCtx = test_util:start_couch([chttpd]),
+ ok = application:start(couch_peruser),
Hashed = couch_passwords:hash_admin_password(?ADMIN_PASSWORD),
ok = config:set("admins", ?ADMIN_USERNAME, ?b2l(Hashed), _Persist=false),
TestCtx.
teardown_all(TestCtx) ->
config:delete("admins", ?ADMIN_USERNAME),
+ ok = application:stop(couch_peruser),
test_util:stop_couch(TestCtx).
setup() ->
--
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.