You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ei...@apache.org on 2019/11/22 14:29:44 UTC
[couchdb] branch prototype/readiness-end-point updated (376c24e ->
034eb33)
This is an automated email from the ASF dual-hosted git repository.
eiri pushed a change to branch prototype/readiness-end-point
in repository https://gitbox.apache.org/repos/asf/couchdb.git.
discard 376c24e Add new _ready end-point
add 9919496 Skip before_doc_update processing for local docs
add 5aed0fd Remove debug logging in fabric2_db_plugin
add dc1b4b8 Fix starkey_docid, endkey_docid and inclusive_end=false for _all_docs
add d5d5b5f Implement _all_docs/queries
add 247bbef Implement _design_docs and _local_docs
add d6b6155 Add a max db name length config option
add 198306c Handle update_seq for _local_docs
add 1c1d326 Handle _changes since=now param
add 2074412 Fetch docs in parallel for view indexing
add 5c3517a Fix _changes heartbeat option
add 91dfd3e Support `--extra_args` parameter in `dev/run`
add 5ffdb91 Merge pull request #2184 from cloudant/add-extra-arguments-to-beam
add 2eb1dee Implement setting and getting _revs_limit
add 9c6b5cb Make get_security and get_revs_limit calls consistent
add 2051bd6 Check members after db is opened
add 01a9228 Add revision stemming for interactive docs
add eed8fb1 Fix doc counts for replicated deletions
add fe9ffad Add more deleted docs replication cases to integration test
add 422416a Add couch_eval abstraction layer
add 41b7211 Initial creation of couch_js application
add 87379c2 Implement couch_js callbacks for couch_eval
add ecc9ae4 Add tests for couch_js application
add d7d32a0 Update couch_views to use couch_eval
add ff2cdb8 Fix mango index validation
add 577dd7f Fix timeout in couch_views
add 76bdf1b DRY out CouchDB FDB prefix fetching
add ae0dc96 Use a shorter name for create_or_open_couchdb_dir
add bfb986f Enable FDB transaction tracing
add f3d572c Take better advantage of metadata version key feature
add 3f322a5 Remove compiler warning
add ed1c3d7 Merge pull request #2274 from cloudant/fix-warning
add 797fe08 Remove old clause which is no longer used
add c3ef462 Merge pull request #2275 from cloudant/remove-ints-client-remains
add 5334997 Chunkify local docs
add 3ded0e5 Add a special error for an invalid legacy local doc revsion
add 987efb3 add test to prove we can view swap
add 8d5c107 Use "\xFF/metadataVersion" key for checking metadata
add 8bb0718 Abandon a view job if the db or ddoc is deleted
add 583d7fe Pass contexts to fabric2_db functions
add 8d28d85 Merge pull request #2279 from cloudant/refactor-user-ctx-handling
add 3db0ba7 Ensure we can create partitioned design docs with FDB
add aaae564 Check security properties in the main transaction
add b71cbe2 Before starting a db transanction, refresh the db handle from the cache
add 44f660f Update fabric2_fdb's set_config to take un-encoding values
add b58dc30 Assert Db handle field existence in `load_config/1` in fabric2_fdb
add 706acca Check membership when calling get_security/1 in fabric2_db
add 2d3737c Support regexp based blacklist in config
add c9b8e25 Implement fabric2_server:fdb_cluster/0
add e93d1b4 Add ctrace application
add 98bc5ea Trace http endpoints
add 4680884 Trace fdb transactions
add 5e47f50 Implement node types
new 034eb33 Add new _ready end-point
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 (376c24e)
\
N -- N -- N refs/heads/prototype/readiness-end-point (034eb33)
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 1 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:
.gitignore | 5 +
dev/run | 16 +-
rebar.config.script | 7 +
rel/overlay/etc/default.ini | 63 +++-
rel/reltool.config | 4 +
src/chttpd/src/chttpd.app.src | 1 +
src/chttpd/src/chttpd.erl | 135 ++++++-
src/chttpd/src/chttpd_app.erl | 4 +-
src/chttpd/src/chttpd_auth_request.erl | 5 +-
src/chttpd/src/chttpd_changes.erl | 16 +-
src/chttpd/src/chttpd_db.erl | 318 ++++++++--------
src/chttpd/src/chttpd_handlers.erl | 7 +-
src/chttpd/src/chttpd_httpd_handlers.erl | 30 +-
src/chttpd/src/chttpd_sup.erl | 16 +-
src/couch/src/couch_httpd.erl | 3 -
src/couch/src/couch_util.erl | 37 +-
src/couch_eval/README.md | 5 +
src/{fabric => couch_eval}/rebar.config | 0
.../src/couch_eval.app.src} | 11 +-
src/couch_eval/src/couch_eval.erl | 97 +++++
src/couch_jobs/src/couch_jobs.hrl | 5 +-
src/couch_jobs/src/couch_jobs_fdb.erl | 5 +-
src/couch_js/README.md | 6 +
.../rexi.app.src => couch_js/src/couch_js.app.src} | 17 +-
src/couch_js/src/couch_js.erl | 51 +++
.../src/couch_js_app.erl} | 12 +-
.../src/couch_js_io_logger.erl} | 2 +-
.../src/couch_js_native_process.erl} | 8 +-
.../src/couch_js_os_process.erl} | 16 +-
.../src/couch_js_proc_manager.erl} | 20 +-
.../src/couch_js_query_servers.erl} | 10 +-
.../src/couch_js_sup.erl} | 21 +-
src/couch_js/test/couch_js_proc_manager_tests.erl | 373 +++++++++++++++++++
.../test/couch_js_query_servers_tests.erl} | 47 +--
src/couch_mrview/src/couch_mrview.erl | 14 +-
src/couch_views/src/couch_views.app.src | 3 +-
src/couch_views/src/couch_views_app.erl | 4 +-
src/couch_views/src/couch_views_indexer.erl | 146 ++++++--
src/couch_views/src/couch_views_jobs.erl | 2 +-
src/couch_views/src/couch_views_sup.erl | 32 +-
src/couch_views/src/couch_views_util.erl | 145 +++++++-
src/couch_views/test/couch_views_indexer_test.erl | 1 +
src/couch_views/test/couch_views_map_test.erl | 7 +-
.../test/couch_views_trace_index_test.erl | 2 +-
src/ctrace/README.md | 291 +++++++++++++++
src/{fabric => ctrace}/rebar.config | 0
.../src/rexi.app.src => ctrace/src/ctrace.app.src} | 15 +-
src/ctrace/src/ctrace.erl | 361 ++++++++++++++++++
.../eunit.config => src/ctrace/src/ctrace.hrl | 8 +-
.../src/ctrace_app.erl} | 9 +-
src/ctrace/src/ctrace_config.erl | 133 +++++++
src/ctrace/src/ctrace_dsl.erl | 106 ++++++
.../src/ctrace_sup.erl} | 35 +-
src/ctrace/test/ctrace_config_test.erl | 153 ++++++++
src/ctrace/test/ctrace_dsl_test.erl | 123 ++++++
src/ctrace/test/ctrace_test.erl | 412 +++++++++++++++++++++
src/fabric/include/fabric2.hrl | 16 +-
src/fabric/src/fabric.app.src | 1 +
src/fabric/src/fabric2_db.erl | 240 +++++++++---
src/fabric/src/fabric2_db_plugin.erl | 11 +-
src/fabric/src/fabric2_fdb.erl | 363 +++++++++++++-----
src/fabric/src/fabric2_node_types.erl | 52 +++
src/fabric/src/fabric2_server.erl | 38 +-
src/fabric/src/fabric2_txids.erl | 10 +-
src/fabric/test/fabric2_db_misc_tests.erl | 56 ++-
src/fabric/test/fabric2_db_security_tests.erl | 141 ++++---
src/fabric/test/fabric2_dir_prefix_tests.erl | 2 +-
src/fabric/test/fabric2_doc_count_tests.erl | 26 ++
src/fabric/test/fabric2_doc_crud_tests.erl | 149 +++++++-
..._tests.erl => fabric2_local_doc_fold_tests.erl} | 85 +++--
src/fabric/test/fabric2_node_types_tests.erl | 73 ++++
src/fabric/test/fabric2_rev_stemming.erl | 204 ++++++++++
src/mango/src/mango_native_proc.erl | 7 +-
test/elixir/test/basics_test.exs | 195 ++++++++++
test/elixir/test/map_test.exs | 67 ++++
test/elixir/test/replication_test.exs | 62 +++-
76 files changed, 4498 insertions(+), 675 deletions(-)
create mode 100644 src/couch_eval/README.md
copy src/{fabric => couch_eval}/rebar.config (100%)
copy src/{couch_pse_tests/src/couch_pse_tests.app.src => couch_eval/src/couch_eval.app.src} (80%)
create mode 100644 src/couch_eval/src/couch_eval.erl
create mode 100644 src/couch_js/README.md
copy src/{rexi/src/rexi.app.src => couch_js/src/couch_js.app.src} (78%)
create mode 100644 src/couch_js/src/couch_js.erl
copy src/{couch_event/src/couch_event_app.erl => couch_js/src/couch_js_app.erl} (87%)
copy src/{couch/src/couch_io_logger.erl => couch_js/src/couch_js_io_logger.erl} (98%)
copy src/{couch/src/couch_native_process.erl => couch_js/src/couch_js_native_process.erl} (99%)
copy src/{couch/src/couch_os_process.erl => couch_js/src/couch_js_os_process.erl} (95%)
copy src/{couch/src/couch_proc_manager.erl => couch_js/src/couch_js_proc_manager.erl} (97%)
copy src/{couch/src/couch_query_servers.erl => couch_js/src/couch_js_query_servers.erl} (98%)
copy src/{couch_views/src/couch_views_sup.erl => couch_js/src/couch_js_sup.erl} (69%)
create mode 100644 src/couch_js/test/couch_js_proc_manager_tests.erl
copy src/{couch/test/eunit/couch_query_servers_tests.erl => couch_js/test/couch_js_query_servers_tests.erl} (76%)
create mode 100644 src/ctrace/README.md
copy src/{fabric => ctrace}/rebar.config (100%)
copy src/{rexi/src/rexi.app.src => ctrace/src/ctrace.app.src} (77%)
create mode 100644 src/ctrace/src/ctrace.erl
copy rel/files/eunit.config => src/ctrace/src/ctrace.hrl (80%)
copy src/{couch_event/src/couch_event_app.erl => ctrace/src/ctrace_app.erl} (88%)
create mode 100644 src/ctrace/src/ctrace_config.erl
create mode 100644 src/ctrace/src/ctrace_dsl.erl
copy src/{ddoc_cache/src/ddoc_cache_sup.erl => ctrace/src/ctrace_sup.erl} (62%)
create mode 100644 src/ctrace/test/ctrace_config_test.erl
create mode 100644 src/ctrace/test/ctrace_dsl_test.erl
create mode 100644 src/ctrace/test/ctrace_test.erl
create mode 100644 src/fabric/src/fabric2_node_types.erl
copy src/fabric/test/{fabric2_doc_fold_tests.erl => fabric2_local_doc_fold_tests.erl} (73%)
create mode 100644 src/fabric/test/fabric2_node_types_tests.erl
create mode 100644 src/fabric/test/fabric2_rev_stemming.erl
[couchdb] 01/01: Add new _ready end-point
Posted by ei...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
eiri pushed a commit to branch prototype/readiness-end-point
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 034eb33c8786560a15a36f4d13f726c03d9eb681
Author: Eric Avdey <ei...@eiri.ca>
AuthorDate: Mon Aug 26 16:54:38 2019 -0300
Add new _ready end-point
Add new _ready end-point similar to _up,
but with a check for fdb availability.
---
src/chttpd/src/chttpd_auth_request.erl | 2 ++
src/chttpd/src/chttpd_httpd_handlers.erl | 1 +
src/chttpd/src/chttpd_misc.erl | 14 ++++++++++++++
3 files changed, 17 insertions(+)
diff --git a/src/chttpd/src/chttpd_auth_request.erl b/src/chttpd/src/chttpd_auth_request.erl
index 26fee17..d4ae060 100644
--- a/src/chttpd/src/chttpd_auth_request.erl
+++ b/src/chttpd/src/chttpd_auth_request.erl
@@ -84,6 +84,8 @@ authorize_request_int(#httpd{path_parts=[_DbName|_]}=Req) ->
server_authorization_check(#httpd{path_parts=[<<"_up">>]}=Req) ->
Req;
+server_authorization_check(#httpd{path_parts=[<<"_ready">>]}=Req) ->
+ Req;
server_authorization_check(#httpd{path_parts=[<<"_uuids">>]}=Req) ->
Req;
server_authorization_check(#httpd{path_parts=[<<"_session">>]}=Req) ->
diff --git a/src/chttpd/src/chttpd_httpd_handlers.erl b/src/chttpd/src/chttpd_httpd_handlers.erl
index de7f3a0..6faa5d0 100644
--- a/src/chttpd/src/chttpd_httpd_handlers.erl
+++ b/src/chttpd/src/chttpd_httpd_handlers.erl
@@ -30,6 +30,7 @@ url_handler(<<"_replicate">>) -> fun chttpd_misc:handle_replicate_req/1;
url_handler(<<"_uuids">>) -> fun chttpd_misc:handle_uuids_req/1;
url_handler(<<"_session">>) -> fun chttpd_auth:handle_session_req/1;
url_handler(<<"_up">>) -> fun chttpd_misc:handle_up_req/1;
+url_handler(<<"_ready">>) -> fun chttpd_misc:handle_ready_req/1;
url_handler(_) -> no_match.
db_handler(<<"_view_cleanup">>) -> fun chttpd_db:handle_view_cleanup_req/2;
diff --git a/src/chttpd/src/chttpd_misc.erl b/src/chttpd/src/chttpd_misc.erl
index 11d2c5b..57a15f0 100644
--- a/src/chttpd/src/chttpd_misc.erl
+++ b/src/chttpd/src/chttpd_misc.erl
@@ -23,6 +23,7 @@
handle_system_req/1,
handle_task_status_req/1,
handle_up_req/1,
+ handle_ready_req/1,
handle_utils_dir_req/1,
handle_utils_dir_req/2,
handle_uuids_req/1,
@@ -510,6 +511,19 @@ handle_up_req(#httpd{method='GET'} = Req) ->
handle_up_req(Req) ->
send_method_not_allowed(Req, "GET,HEAD").
+
+handle_ready_req(#httpd{method='GET'} = Req) ->
+ try
+ fabric2_db:list_dbs([{limit, 0}]),
+ send_json(Req, 200, {[{status, ready}]})
+ catch error:{timeout, _} ->
+ send_json(Req, 404, {[{status, unavailable}]})
+ end;
+
+handle_ready_req(Req) ->
+ send_method_not_allowed(Req, "GET,HEAD").
+
+
message_queues(Registered) ->
lists:map(fun(Name) ->
Type = message_queue_len,