I will double check that part of the code, since I don't think a lock get is necessary. It only updates a value inside a node, inside the list of nodes, but not changes the list links at all. (this in another PR)
I think you're right. However, you would need a memory fence to safely access the values in shared memory without a lock. Also, without the lock, you might get multiple processes doing the health check at the same time, but that's not a big deal. If you want to be fancy, you could make it so that other processes skip the instance while some process is doing busy the health check, and only use it (or continue skipping it) after the health check is done.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.