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 2014/08/17 04:14:07 UTC

[1/4] git commit: Don't break if we terminate during a changes reader restart

Repository: couchdb-cassim
Updated Branches:
  refs/heads/windsor-merge cef09097a -> f8cd12a8a


Don't break if we terminate during a changes reader restart


Project: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/commit/bc74f289
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/tree/bc74f289
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/diff/bc74f289

Branch: refs/heads/windsor-merge
Commit: bc74f289d3e01d268c60e6ae5b09fc4e0c1d5239
Parents: cef0909
Author: Paul J. Davis <pa...@gmail.com>
Authored: Sat Aug 16 21:12:12 2014 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Sat Aug 16 21:12:12 2014 -0500

----------------------------------------------------------------------
 src/cassim_metadata_cache.erl | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-cassim/blob/bc74f289/src/cassim_metadata_cache.erl
----------------------------------------------------------------------
diff --git a/src/cassim_metadata_cache.erl b/src/cassim_metadata_cache.erl
index 1eb0fc9..335256b 100644
--- a/src/cassim_metadata_cache.erl
+++ b/src/cassim_metadata_cache.erl
@@ -125,6 +125,8 @@ handle_info(_Msg, State) ->
     {noreply, State}.
 
 
+terminate(_Reason, #st{changes_pid = undefined}) ->
+    ok;
 terminate(_Reason, #st{changes_pid = Pid}) ->
     exit(Pid, kill),
     ok.


[4/4] git commit: Remove Cloudant specific auth

Posted by da...@apache.org.
Remove Cloudant specific auth


Project: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/commit/f8cd12a8
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/tree/f8cd12a8
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/diff/f8cd12a8

Branch: refs/heads/windsor-merge
Commit: f8cd12a8a9e5c7688b480999dcb14d5d22876a24
Parents: ff6da2e
Author: Paul J. Davis <pa...@gmail.com>
Authored: Sat Aug 16 21:13:53 2014 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Sat Aug 16 21:13:53 2014 -0500

----------------------------------------------------------------------
 src/cassim_security.erl | 8 --------
 1 file changed, 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-cassim/blob/f8cd12a8/src/cassim_security.erl
----------------------------------------------------------------------
diff --git a/src/cassim_security.erl b/src/cassim_security.erl
index b4033c5..f000f01 100644
--- a/src/cassim_security.erl
+++ b/src/cassim_security.erl
@@ -110,8 +110,6 @@ validate_security_doc(#doc{body={SecProps}}) ->
         couch_util:get_value(<<"readers">>, SecProps, {[]})),
     ok = validate_names_and_roles(Admins),
     ok = validate_names_and_roles(Members),
-    Users = couch_util:get_value(<<"cloudant">>, SecProps, {[]}),
-    ok = validate_cloudant_roles(Users),
     ok.
 
 
@@ -124,12 +122,6 @@ validate_names_and_roles({Props}) when is_list(Props) ->
     ).
 
 
-validate_cloudant_roles({Props}) when is_list(Props) ->
-    lists:foreach(fun({U, R}) -> validate_roles_list(U, R) end, Props);
-validate_cloudant_roles(_) ->
-    throw("Cloudant field must be a set of name roles list pairs").
-
-
 validate_roles_list(Field, Roles) when is_list(Roles) ->
     case lists:all(fun(X) -> is_binary(X) end, Roles) of
         true -> ok;


[2/4] git commit: Use the correct warning log function

Posted by da...@apache.org.
Use the correct warning log function


Project: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/commit/e697e993
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/tree/e697e993
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/diff/e697e993

Branch: refs/heads/windsor-merge
Commit: e697e993c05a5316bf54c40193b7a43a50b76ac4
Parents: bc74f28
Author: Paul J. Davis <pa...@gmail.com>
Authored: Sat Aug 16 21:12:29 2014 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Sat Aug 16 21:12:29 2014 -0500

----------------------------------------------------------------------
 src/cassim_metadata_cache.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-cassim/blob/e697e993/src/cassim_metadata_cache.erl
----------------------------------------------------------------------
diff --git a/src/cassim_metadata_cache.erl b/src/cassim_metadata_cache.erl
index 335256b..509b22a 100644
--- a/src/cassim_metadata_cache.erl
+++ b/src/cassim_metadata_cache.erl
@@ -162,7 +162,7 @@ changes_callback({change, {Change}}, _) ->
         false ->
             case couch_util:get_value(doc, Change) of
                 {error, Reason} ->
-                    couch_log:warn(
+                    couch_log:warning(
                         "could not retrieve metadata doc ~s: ~p", [Id, Reason]);
                 Props ->
                     gen_server:cast(?MODULE, {insert_cached_meta, {Id, Props}})
@@ -185,7 +185,7 @@ load_meta_from_db(DbName, MetaId) ->
         {ok, Doc} ->
             couch_doc:to_json_obj(Doc, []);
         _Else ->
-            couch_log:warn("no record of meta ~s", [MetaId]),
+            couch_log:warning("no record of meta ~s", [MetaId]),
             undefined
     catch error:database_does_not_exist ->
         undefined


[3/4] git commit: Update all docs callbacks for new fabric

Posted by da...@apache.org.
Update all docs callbacks for new fabric


Project: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/commit/ff6da2e1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/tree/ff6da2e1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/diff/ff6da2e1

Branch: refs/heads/windsor-merge
Commit: ff6da2e1154304fb2a0836f166918699506a388c
Parents: e697e99
Author: Paul J. Davis <pa...@gmail.com>
Authored: Sat Aug 16 21:13:22 2014 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Sat Aug 16 21:13:22 2014 -0500

----------------------------------------------------------------------
 src/cassim_metadata_cache.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-cassim/blob/ff6da2e1/src/cassim_metadata_cache.erl
----------------------------------------------------------------------
diff --git a/src/cassim_metadata_cache.erl b/src/cassim_metadata_cache.erl
index 509b22a..8bd15fb 100644
--- a/src/cassim_metadata_cache.erl
+++ b/src/cassim_metadata_cache.erl
@@ -240,9 +240,9 @@ cleanup_old_docs(MetaId) ->
     ok.
 
 
-cleanup_old_docs_callback({total_and_offset, _Total, _Offset}, {MetaId, Acc}) ->
+cleanup_old_docs_callback({meta, _}, {MetaId, Acc}) ->
     {ok, {MetaId, Acc}};
-cleanup_old_docs_callback({row, {Row}}, {MetaId, Acc}) ->
+cleanup_old_docs_callback({row, Row}, {MetaId, Acc}) ->
     Id = couch_util:get_value(id, Row),
     case MetaId == Id of
         true ->