When a user 'action' (in a general sense) is executed in Salesforce, assuming no callouts or async jobs are executed, isn't the code running in a single thread/transaction? Assuming so, how is it that I get a row lock error when I know I'm the only user in my personal sandbox (no other user is awaiting for the same record I'm updating). Based on this link: https://help.salesforce.com/s/articleView?id=000387767&type=1, it's possible to get a row lock error if there are thousands of child records. However, it does mention again if there are multiple users.
I ended up queueing the part of the code that was throwing the row lock error and the issue went away. However, I'm still confused per my query above.
Can you specify the transaction mode (after insert, after update) ? Also if possible can you specify which flow, apex class , etc throwing the error? If it’s “after update” it might possible that you are trying to update value of record which is already in “trigger”.
Let me summarise for you. We can not update record in after update.