nickva commented on a change in pull request #626: Also enable node decom using
string "true"
URL: https://github.com/apache/couchdb/pull/626#discussion_r125309185
##########
File path: src/mem3/src/mem3.erl
##########
@@ -249,7 +249,10 @@ range(<<"shards/", Start:8/binary, "-", End:8/binary,
"/", _/binary>>) ->
httpd_util:hexlist_to_integer(binary_to_list(End))].
allowed_nodes() ->
- [Node || Node <- mem3:nodes(), mem3:node_info(Node, <<"decom">>) =/= true].
+ lists:filter(fun(Node) ->
+ Decom = mem3:node_info(Node, <<"decom">>),
+ (Decom =/= true) and (Decom =/= <<"true">>)
Review comment:
Minor nit: wonder if `andalso` might work better in general. I usually see
that used in conditionals and guards more than `and`
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services