global lock

Roberto Ostinelli ostinelli@REDACTED
Sun Nov 24 20:28:57 CET 2019


All,
In my cluster some nodes can generate events when a consistency issue is
detected. When this happens, I'd like one node (and only one) to resolve
this conflict.

global:trans/4 allows to set the number of retries, so one approach could
be to set retries to 0 so *if* my understanding is correct, only 1 node
would do the conflict resolution (the one that grabs the lock). If some
kind soul can confirm that this is correct, thank you in advance. :)

Otherwise, what other options do I have? For example, can I set a flag
somehow so that the nodes that run the code in the global:trans know that
this has already been done by another node?

Thank you,
r.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20191124/53ca8fbf/attachment.htm>


More information about the erlang-questions mailing list