nickva commented on code in PR #4199: URL: https://github.com/apache/couchdb/pull/4199#discussion_r991421644
########## src/couch/src/couch_server.erl: ########## @@ -31,6 +31,7 @@ -export([num_servers/0, couch_server/1, couch_dbs_pid_to_name/1, couch_dbs/1]). -export([aggregate_queue_len/0, get_spidermonkey_version/0]). -export([names/0]). +-export([try_lock/2]). Review Comment: The main idea would to keep the logic of locking/unlocking is in one place, so if we see the `try_lock/2` in `couch_server` the function right bellow would be `unlock/2` so it's obvious how unlocking happens. It's just one line but the semantics of it is pretty tricky to reason about (like we noticed it was spread between two separate modules). -- 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]
