[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH/RFC] Simplify implementation of lock / unlock operations in FSFS

From: Sergey Raevskiy <sergey.raevskiy_at_visualsvn.com>
Date: Thu, 12 Feb 2015 01:43:49 +0300

>> Recently I've spent some time investigating how lock and unlock are
>> implemented in FSFS and can suggest the following simplification. I
>> attempted just to make this part clearer and a new code is intended to
>> behave exactly the same.
>
> It's not exactly the same, index files are written/deleted in a
> different order. I think that change is OK but can you confirm that
> this is expected?

Yes, the behaviour is *not* exactly the same -- the index files is updated in
different order. Furthermore, I've realized that current version of algorithm
will set some locks even if update of some index files is failed.

Let's say we need to lock the following paths:

    /abc
    /foo/bar

Even if updating of index file for '/foo' will fail, the lock for '/abc' will
be set. I don't know if it really matters since this depends on 'implementation
details' like sorting order etc. If we really need to follow this 'set as much
locks as much as possible' strategy then my patch is not correct. BTW, current
version is not following this strategy strictly.
Received on 2015-02-11 23:45:05 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.