basho / riak

Riak is a decentralized datastore from Basho Technologies.
http://docs.basho.com
Apache License 2.0
3.92k stars 534 forks source link

pass NODETOOL_NODE_PREFIX to relx-generated script, spare some atoms #1079

Closed hmmr closed 2 years ago

hmmr commented 2 years ago

Each time riak status (and the like) is run, relx generates a unique id which is then converted to an atom (of the form "maint1a2b3c4d-riak@127.0.0.1") in the riak VM to which it connects, eventually causing atom table exhaustion. Now that relx has been modified to optionally produce a static id if NODETOOL_NODE_PREFIX env var is present instead of generating a random id, let's make use of this. Convenient when the caller guarantees calls are always serialized.

ThomasArts commented 2 years ago

Could you please explain here what happens if you do not set NODETOOL_NODE_PREFIX today and what would happen with your patch if you do not set this variable?

Would it impact customers that don't bother using this env variable?

hmmr commented 2 years ago

If NODETOOL_NODE_PREFIX is not set, relx will default to old behaviour, which is to generate a random id.

Customers are only to be advised to use this feature if they can guarantee their calls to riak status are always separated in time. However, if they can guarantee that, the patch will help to mitigate against atom table overflow.

hmmr commented 2 years ago

Just a heads-up (apologies if you have already taken this into account): this feature should be mentioned in release announcement. Those who do periodic, and frequent enough, riak status on their clusters, would appreciate it.

martinsumner commented 2 years ago

@hmmr - release PR is here https://github.com/basho/riak/pull/1082, including release notes update