couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [22/23] fabric commit: updated refs/heads/windsor-merge to 4ec3f11
Date Fri, 01 Aug 2014 14:30:02 GMT
Set non-interactive default for set_security

Prior to this commit, fabric:set_security would default to interactive
IO priority. This would cause all nodes to set the security header
except shards on any nodes which were in MM. Subsequent calls to
fabric:get_security would cause inconsistent security properties to be
applied to the request. This patch sets a non-interactive default for
fabric:set_security, which will cause security updates to be applied to
all nodes regardless of MM by default.

BugzID: 28847


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

Branch: refs/heads/windsor-merge
Commit: 25d4fe5ccce3c0b501024887119dc1881efc0048
Parents: 828faf5
Author: Benjamin Bastian <benjamin.bastian@gmail.com>
Authored: Wed Mar 12 22:50:52 2014 -0400
Committer: Robert Newson <rnewson@apache.org>
Committed: Fri Aug 1 15:28:03 2014 +0100

----------------------------------------------------------------------
 src/fabric_rpc.erl | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/25d4fe5c/src/fabric_rpc.erl
----------------------------------------------------------------------
diff --git a/src/fabric_rpc.erl b/src/fabric_rpc.erl
index 6c0d47a..b5ec718 100644
--- a/src/fabric_rpc.erl
+++ b/src/fabric_rpc.erl
@@ -152,7 +152,13 @@ get_update_seq(DbName) ->
 get_update_seq(DbName, DbOptions) ->
     with_db(DbName, DbOptions, {couch_db, get_update_seq, []}).
 
-set_security(DbName, SecObj, Options) ->
+set_security(DbName, SecObj, Options0) ->
+    Options = case lists:keyfind(io_priority, 1, Options0) of
+        false ->
+            [{io_priority, {db_meta, security}}|Options0];
+        _ ->
+            Options0
+    end,
     with_db(DbName, Options, {couch_db, set_security, [SecObj]}).
 
 get_all_security(DbName, Options) ->


Mime
View raw message