<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_extra">On Wed, May 24, 2017 at 3:19 PM, Jesper Louis Andersen <span dir="ltr"><<a href="mailto:jesper.louis.andersen@gmail.com" target="_blank">jesper.louis.andersen@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""></span><br><div class="gmail_quote"><div>As for the two DB writes to the same row in short order: Mnesia uses an optimistic locking strategy. If two transactions write to the same row at the same time, both will aborted, wait a bit and try again. If you're unlucky, those two writes will keep interfering with each other and you will get lag.<br></div></div></div></blockquote><div><br><div style="font-family:arial,helvetica,sans-serif;display:inline" class="gmail_default">​No, only one transaction will be restarted.​</div> <div style="font-family:arial,helvetica,sans-serif;display:inline" class="gmail_default">​The "oldest" one will be completed.<br><br></div><div style="font-family:arial,helvetica,sans-serif;display:inline" class="gmail_default">/Håkan<br>​</div></div></div></div></div>