You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/10/30 17:00:47 UTC

[GitHub] [couchdb] davisp commented on a change in pull request #2279: Pass contexts to fabric2_db functions

davisp commented on a change in pull request #2279: Pass contexts to fabric2_db functions
URL: https://github.com/apache/couchdb/pull/2279#discussion_r340742728
 
 

 ##########
 File path: src/chttpd/src/chttpd_db.erl
 ##########
 @@ -360,10 +357,10 @@ handle_design_info_req(#httpd{method='GET'}=Req, Db, #doc{} = DDoc) ->
 handle_design_info_req(Req, _Db, _DDoc) ->
     send_method_not_allowed(Req, "GET").
 
-create_db_req(#httpd{}=Req, DbName) ->
+create_db_req(#httpd{user_ctx=Ctx}=Req, DbName) ->
     couch_httpd:verify_is_server_admin(Req),
     DocUrl = absolute_uri(Req, "/" ++ couch_util:url_encode(DbName)),
-    case fabric2_db:create(DbName, []) of
+    case fabric2_db:create(DbName, [{user_ctx, Ctx}]) of
 
 Review comment:
   Its returned on the created database. Not sure what you mean about thrown away.
   
   We do remove it when its stored in the cache so we're not leaking user_ctx's between requests.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services