Are mnesia event listeners guaranteed to get each record state if it changes quickly?

Let's say I have a record like {my_table, Id, Value}

.
I am constantly rewriting the value so that it contains whole integers like 1, 2, 3, 4, 5, etc. In a distributed environment, is it guaranteed that my event listeners get all values? (I don't care about ordering)

+3


source to share


1 answer


I haven't confirmed this yet by reading this part of the source, but it seems like sending a post is part of the update process, so messages should always come out even with very quick changes. (An alternative for Mnesia would be to either rewind the messages in the queue, or swap the queues and start them in batches. I'm pretty sure this is not what is happening - it would be too difficult to predict the variability of the timing of job start-ups or the message queue queue. posts is generally much cheaper than making changes to the db.)



Since Erlang makes sure messages are delivered to a live destination, this is as close as possible to the promise that every Mnesia change will eventually be seen, as you are likely to receive. The order of the messages cannot be guaranteed on the receiving end (as you think you would expect), and of course, a network failure can cause a set of messages to be missed (giving the addressee something other than alive from the sender's point of view).

+1


source







All Articles