[Samba] renaming over to a busy file: traces

Ralph Boehme slow at samba.org
Wed Mar 20 18:30:30 UTC 2024


On 3/20/24 19:25, Michael Tokarev wrote:
> 20.03.2024 21:23, Ralph Boehme wrote:
>> On 3/20/24 19:11, Michael Tokarev wrote:
>>> 20.03.2024 20:18, Ralph Boehme via samba:
>>>
>>>> I guess the problem is that we can't lock two locking.tdb records 
>>>> simultaneously. We already have the source file record locked, also 
>>>> locking the the destination record is not possible.
>>>
>>> Why it is not possible?
>>>
>>> Second lock can't be done in waiting mode, it can only be done
>>> in lock-or-fail mode obviously (or else it is too prone to deadlocks).
>>
>> it's prone to deadlock because another process could try to acquire 
>> the locks on the records in the reverse order.
> 
> Umh.  So what?
> 
> If the second lock (of either process) is of "lock-or-fail" kind
> instead of "lock-or-wait", there would be no deadlocks.

simplified answer: we don't have a lock-or-wait.

-slow

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba/attachments/20240320/4ea9cef9/OpenPGP_signature.sig>


More information about the samba mailing list