You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by gi...@git.apache.org on 2017/05/10 15:08:15 UTC

[GitHub] davisp commented on a change in pull request #495: Couchdb 3288 mixed cluster upgrade

davisp commented on a change in pull request #495: Couchdb 3288 mixed cluster upgrade
URL: https://github.com/apache/couchdb/pull/495#discussion_r115767125
 
 

 ##########
 File path: src/couch/src/couch_db.erl
 ##########
 @@ -112,9 +198,31 @@ reopen(#db{main_pid = Pid, fd = Fd, fd_monitor = OldRef, user_ctx = UserCtx}) ->
         {ok, NewDb#db{user_ctx = UserCtx, fd_monitor = NewRef}}
     end.
 
+incref(#db{fd = Fd} = Db) ->
+    Ref = erlang:monitor(process, Fd),
+    {ok, Db#db{fd_monitor = Ref}}.
+
+clustered_db(DbName, UserCtx) ->
+    clustered_db(DbName, UserCtx, []).
+
+clustered_db(DbName, UserCtx, SecProps) ->
+    {ok, #db{name = DbName, user_ctx = UserCtx, security = SecProps}}.
 
 Review comment:
   I did that to mimic the couch_db:open/2 format. I've not got a huge preference either way though I'd lean towards keeping the same pattern for consistency.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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