nickva commented on a change in pull request #2300: Check security properties 
in the main transaction
URL: https://github.com/apache/couchdb/pull/2300#discussion_r346434765
 
 

 ##########
 File path: src/fabric/src/fabric2_db.erl
 ##########
 @@ -359,17 +374,17 @@ get_pid(#{}) ->
 
 
 get_revs_limit(#{} = Db) ->
-    RevsLimitBin = fabric2_fdb:transactional(Db, fun(TxDb) ->
-        fabric2_fdb:get_config(TxDb, <<"revs_limit">>)
+    #{revs_limit := RevsLimit} = fabric2_fdb:transactional(Db, fun(TxDb) ->
+        fabric2_fdb:ensure_current(TxDb)
     end),
-    ?bin2uint(RevsLimitBin).
+    RevsLimit.
 
 
 get_security(#{} = Db) ->
-    SecBin = fabric2_fdb:transactional(Db, fun(TxDb) ->
-        fabric2_fdb:get_config(TxDb, <<"security_doc">>)
+    #{security_doc := SecDoc} = fabric2_fdb:transactional(Db, fun(TxDb) ->
+        fabric2_fdb:ensure_current(no_security_check(TxDb))
 
 Review comment:
   The idea is that we'd need to be able to read the security doc to check 
membership but for get_revs_limit we don't need to do it

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to