nickva commented on code in PR #4240:
URL: https://github.com/apache/couchdb/pull/4240#discussion_r1005200415
##########
src/couch/src/couch_server.erl:
##########
@@ -381,7 +369,7 @@ handle_config_change("couchdb_engines", _, _, _, N) ->
{ok, N};
handle_config_change("admins", _, _, Persist, N) ->
% spawn here so couch event manager doesn't deadlock
- spawn(fun() -> hash_admin_passwords(Persist) end),
+ couch_password_server:hash(true, Persist),
Review Comment:
I wonder if another problem here is that we'll be rehashing the password N
times, once for each couch_server? For instance on a 96 cpu server, we'll
rehash the password 96 times in parallel, it seems.
An ideal way to handle it might be to just remove the password rehashing
from here to the new password hasher gen_server, which we have one of. So it
would have the `handle_config_change` callback and so on. A quicker hack for
now could be to only handle admin rehashing for `N=1`. Also do the same for
httpd changes, we don't need to stop/restart the httpd backend N times.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]