You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2019/06/20 14:28:29 UTC

[couchdb] branch prototype/fdb-layer updated (21af513 -> 6e27b7d)

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

davisp pushed a change to branch prototype/fdb-layer
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


    from 21af513  Implement `_users` db authentication
     new cc2d64d  Update get security to use fabric2
     new 2cbc7f0  Fix arity in changes timeout callback
     new 6e27b7d  Fix exception in cache auth doc update

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:
 src/chttpd/src/chttpd_auth_cache.erl | 4 ++--
 src/chttpd/src/chttpd_changes.erl    | 4 ++--
 src/chttpd/src/chttpd_db.erl         | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)


[couchdb] 01/03: Update get security to use fabric2

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch prototype/fdb-layer
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit cc2d64d9d2d0610f5d72c4c8046882c0db6a1ee2
Author: Eric Avdey <ei...@eiri.ca>
AuthorDate: Thu Jun 20 10:41:30 2019 -0300

    Update get security to use fabric2
---
 src/chttpd/src/chttpd_db.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/chttpd/src/chttpd_db.erl b/src/chttpd/src/chttpd_db.erl
index 4337041..c0ac1ca 100644
--- a/src/chttpd/src/chttpd_db.erl
+++ b/src/chttpd/src/chttpd_db.erl
@@ -734,7 +734,7 @@ db_req(#httpd{method = 'PUT',path_parts = [_, <<"_security">>]} = Req, Db) ->
     end;
 
 db_req(#httpd{method='GET',path_parts=[_,<<"_security">>]}=Req, Db) ->
-    send_json(Req, fabric:get_security(Db));
+    send_json(Req, fabric2_db:get_security(Db));
 
 db_req(#httpd{path_parts=[_,<<"_security">>]}=Req, _Db) ->
     send_method_not_allowed(Req, "PUT,GET");


[couchdb] 02/03: Fix arity in changes timeout callback

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch prototype/fdb-layer
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 2cbc7f03082721a64dba9bb601bc5f894187ebff
Author: Eric Avdey <ei...@eiri.ca>
AuthorDate: Thu Jun 20 10:42:30 2019 -0300

    Fix arity in changes timeout callback
---
 src/chttpd/src/chttpd_auth_cache.erl | 2 +-
 src/chttpd/src/chttpd_changes.erl    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/chttpd/src/chttpd_auth_cache.erl b/src/chttpd/src/chttpd_auth_cache.erl
index d947fe6..fc1ee62 100644
--- a/src/chttpd/src/chttpd_auth_cache.erl
+++ b/src/chttpd/src/chttpd_auth_cache.erl
@@ -176,7 +176,7 @@ changes_callback({change, {Change}}, _) ->
             ets_lru:remove(?CACHE, UserName)
     end,
     {ok, couch_util:get_value(seq, Change)};
-changes_callback(timeout, Acc) ->
+changes_callback({timeout, _ResponseType}, Acc) ->
     {ok, Acc};
 changes_callback({error, _}, EndSeq) ->
     exit({seq, EndSeq}).
diff --git a/src/chttpd/src/chttpd_changes.erl b/src/chttpd/src/chttpd_changes.erl
index d27bbad..0e03482 100644
--- a/src/chttpd/src/chttpd_changes.erl
+++ b/src/chttpd/src/chttpd_changes.erl
@@ -485,10 +485,10 @@ get_changes_timeout(Args, Callback) ->
         end;
     true ->
         {DefaultTimeout,
-            fun(UserAcc) -> {ok, Callback(timeout, ResponseType, UserAcc)} end};
+            fun(UserAcc) -> {ok, Callback({timeout, ResponseType}, UserAcc)} end};
     _ ->
         {lists:min([DefaultTimeout, Heartbeat]),
-            fun(UserAcc) -> {ok, Callback(timeout, ResponseType, UserAcc)} end}
+            fun(UserAcc) -> {ok, Callback({timeout, ResponseType}, UserAcc)} end}
     end.
 
 start_sending_changes(Callback, UserAcc) ->


[couchdb] 03/03: Fix exception in cache auth doc update

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch prototype/fdb-layer
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 6e27b7df5c695dc31d4d6de56e1dabead0ec81d0
Author: Eric Avdey <ei...@eiri.ca>
AuthorDate: Thu Jun 20 10:44:07 2019 -0300

    Fix exception in cache auth doc update
---
 src/chttpd/src/chttpd_auth_cache.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/chttpd/src/chttpd_auth_cache.erl b/src/chttpd/src/chttpd_auth_cache.erl
index fc1ee62..e986af6 100644
--- a/src/chttpd/src/chttpd_auth_cache.erl
+++ b/src/chttpd/src/chttpd_auth_cache.erl
@@ -231,7 +231,7 @@ update_doc_ignoring_conflict(DbName, Doc) ->
     try
         fabric2_db:update_doc(DbName, Doc)
     catch
-        throw:conflict ->
+        error:conflict ->
             ok
     end.