REMOVE LEAF command completes successfully, then within a few seconds the leaf is automatically added back to the cluster.
DETACH LEAF followed by REMOVE LEAF successfully shows the detached state, then removes the leaf, but it's also automatically added back again within a few seconds.
How do we keep a leaf removed permanently for config changes? Shutting down the leaf would mean no rebalancing and possible data loss and any restart immediately rejoins the cluster again.
Another solution is to run
memsql-ops memsql-unmonitor
on the command line; this will allow you to choose the leaf in question and unmonitor it. MemSQL Ops will not touch unmonitored nodes; this allows you to play around with that node at your leisure. When you're ready to re-add it to the cluster, just runmemsql-ops memsql-monitor -h <host of the MemSQL node> -P <port> -u <MemSQL user> -p <password>
.Enabling manual control also works well, but it has the disadvantage that some functionality will be locked out (e.g. the
cluster-start
command).