<div dir="ltr">I can confirm that this is a thing, at least it's happening to me as well (we're on v2.8.1 still). It isn't affecting performance from what I can tell, but the lock_version value for the user keeps getting higher (currently over 370000). At some point I shut down AS, reset the lock_version to 0, and restarted, and it just started doing it again.<div><br></div><div>It doesn't seem to be causing any other problems, but it does fill up the logs, and it's annoying. What version are you on? We're getting ready to upgrade and I was hoping the problem would magically go away when we did. </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 2, 2021 at 1:11 PM Galligan, Patrick <<a href="mailto:PGalligan@rockarch.org">PGalligan@rockarch.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="gmail-m_7057321681444689493WordSection1">
<p class="MsoNormal">Peter,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Unfortunately that’s an empty set. It seems like the lock_version is constantly changing for this record. I’m not sure why.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">-Patrick<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal" style="margin-bottom:12pt"><b><span style="font-size:12pt;color:black">From:
</span></b><span style="font-size:12pt;color:black"><a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org" target="_blank">archivesspace_users_group-bounces@lyralists.lyrasis.org</a> <<a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org" target="_blank">archivesspace_users_group-bounces@lyralists.lyrasis.org</a>> on behalf of Peter Heiner <<a href="mailto:ph448@cam.ac.uk" target="_blank">ph448@cam.ac.uk</a>><br>
<b>Date: </b>Thursday, December 2, 2021 at 12:41 PM<br>
<b>To: </b>Archivesspace Users Group <<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org" target="_blank">archivesspace_users_group@lyralists.lyrasis.org</a>><br>
<b>Subject: </b>Re: [Archivesspace_Users_Group] Optimistic locking error<u></u><u></u></span></p>
</div>
<div style="border:1pt solid windowtext;padding:2pt;display:inline-block">
<p class="MsoNormal" style="line-height:13pt"><b><span style="font-size:12pt">***External***</span></b><em><span style="font-size:12pt;font-family:Calibri,sans-serif"> This email originated from outside of the organization. Do not click links or open
attachments unless you recognize the sender and know the content is safe.***</span></em><span style="font-size:12pt"><u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12pt"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Hi Patrick,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">What does<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">SELECT * FROM `user` <span style="color:black;background:white">WHERE ((`id` = 113) AND (`lock_version` = 1271));</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black;background:white">say?</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">p<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="0" width="100%" align="center">
</div>
<div id="gmail-m_7057321681444689493divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> <a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org" target="_blank">archivesspace_users_group-bounces@lyralists.lyrasis.org</a> <<a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org" target="_blank">archivesspace_users_group-bounces@lyralists.lyrasis.org</a>> on behalf of Galligan, Patrick <<a href="mailto:PGalligan@rockarch.org" target="_blank">PGalligan@rockarch.org</a>><br>
<b>Sent:</b> 02 December 2021 16:57<br>
<b>To:</b> Archivesspace Users Group <<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org" target="_blank">archivesspace_users_group@lyralists.lyrasis.org</a>><br>
<b>Subject:</b> [Archivesspace_Users_Group] Optimistic locking error</span> <u></u>
<u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
<div>
<div>
<p class="gmail-m_7057321681444689493xmsonormal" style="margin:0in">Hi all,<span style="font-size:12pt"><u></u><u></u></span></p>
<p class="gmail-m_7057321681444689493xmsonormal" style="margin:0in"> <span style="font-size:12pt"><u></u><u></u></span></p>
<p class="gmail-m_7057321681444689493xmsonormal" style="margin:0in">I’m trying to diagnose and fix a warning I’m seeing in our AS log files every 12 or 13 seconds:<span style="font-size:12pt"><u></u><u></u></span></p>
<p class="gmail-m_7057321681444689493xmsonormal" style="margin:0in"> <span style="font-size:12pt"><u></u><u></u></span></p>
<p class="gmail-m_7057321681444689493xmsonormal" style="margin:0in">Got an optimistic locking error when updating user: Attempt to update object did not result in a single row modification (SQL: UPDATE `user` SET `system_mtime` = '2021-12-02 16:52:37', `user_mtime` = '2021-12-02 16:52:37',
`lock_version` = 1272 WHERE ((`id` = 113) AND (`lock_version` = 1271)) LIMIT 1)<span style="font-size:12pt"><u></u><u></u></span></p>
<p class="gmail-m_7057321681444689493xmsonormal" style="margin:0in"> <span style="font-size:12pt"><u></u><u></u></span></p>
<p class="gmail-m_7057321681444689493xmsonormal" style="margin:0in">I can delete the user, but if I remake it with the same username, the warning comes back. If I leave the user open for editing, I get the “This record has been updated by another user. Please refresh the page to access
the latest version,” message in the UI.<span style="font-size:12pt"><u></u><u></u></span></p>
<p class="gmail-m_7057321681444689493xmsonormal" style="margin:0in"> <span style="font-size:12pt"><u></u><u></u></span></p>
<p class="gmail-m_7057321681444689493xmsonormal" style="margin:0in">Any idea how to fix this issue? I’d prefer to be able to keep the username the same. I’m not sure why the system thinks there are two different lock versions associated with the record.<span style="font-size:12pt"><u></u><u></u></span></p>
<p class="gmail-m_7057321681444689493xmsonormal" style="margin:0in"> <span style="font-size:12pt"><u></u><u></u></span></p>
<p class="gmail-m_7057321681444689493xmsonormal" style="margin:0in">Thanks,<span style="font-size:12pt"><u></u><u></u></span></p>
<p class="gmail-m_7057321681444689493xmsonormal" style="margin:0in">Patrick Galligan<span style="font-size:12pt"><u></u><u></u></span></p>
<p class="gmail-m_7057321681444689493xmsonormal" style="margin:0in">Rockefeller Archive Center<span style="font-size:12pt"><u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
Archivesspace_Users_Group mailing list<br>
<a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" target="_blank">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br>
<a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" rel="noreferrer" target="_blank">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><font size="2" style="background-color:rgb(255,255,255)" color="#666666">Trevor Thornton</font><div><font size="2" style="background-color:rgb(255,255,255)" color="#666666">Applications Developer, Digital Library Initiatives</font></div><div><font size="2" style="background-color:rgb(255,255,255)" color="#666666">North Carolina State University Libraries</font></div></div></div></div></div></div></div>