fixing broken file locking on exotic filesystems

5 views
Skip to first unread message

rndblnch

unread,
Dec 20, 2008, 3:52:48 PM12/20/08
to Django developers
hi,

some times ago, i created a ticket for a bug in file locking on my
system (volume mounted with appletalk on a mac) [0].
after a first proposal for fixing the bug (with patch), i asked for
feedback and got some [1].
i then proposed another fix (with patch) [2].
basically it just provides the minimum hooks that allow to fix the bug
from client code since i've been told that my bug is not common enough
to deserve a deep change in code base.
can someone review this proposal ?
thank you !

renaud

0. File locking broken on AFP mounts
<http://code.djangoproject.com/ticket/9433>

1. patch review wanted (ticket #9433)
<http://groups.google.com/group/django-developers/browse_thread/thread/
e53852d7ec79bbd5>

2. another proposed way for fixing this issue
<http://code.djangoproject.com/ticket/9433#comment:5>

rndblnch

unread,
Jan 3, 2009, 11:25:08 AM1/3/09
to Django developers


On 20 déc 2008, 21:52, rndblnch <rndbl...@gmail.com> wrote:
> hi,
>
> some times ago, i created a ticket for a bug in file locking on my
> system (volume mounted with appletalk on a mac) [0].
> after a first proposal for fixing the bug (with patch), i asked for
> feedback and got some [1].
> i then proposed another fix (with patch) [2].
> basically it just provides the minimum hooks that allow to fix the bug
> from client code since i've been told that my bug is not common enough
> to deserve a deep change in code base.
> can someone review this proposal ?
> thank you !

bump, bump :)
renaud

Malcolm Tredinnick

unread,
Jan 4, 2009, 6:45:50 PM1/4/09
to django-d...@googlegroups.com
On Sat, 2009-01-03 at 08:25 -0800, rndblnch wrote:
[...]
> bump, bump :)

You appear to have accidentally bumped into your keyboard. You should
try to stop doing that; you'll hurt something.

We'll get to your patch in due course. If it solves your problem for
now, use it and be happy. That will satisfy what appears to be 100% of
the people affected by that particular problem. Personally, I'm not
convinced that change should go in because I'm not completely
comfortable with encouraging people to use filesystems that are broken
(it's 2008, not 1998. If a filesystem on a Unix-like system doesn't
support proper locking semantics, -- which means ioctl() calls -- it's
broken for locking purposes). However that does have to be balanced with
the pragmatism argument that people might be permitted to blow their
feet off if they choose. So whilst I'm aware of the ticket, I'm still
thinking about whether it's a good thing to apply (and, whilst I'm on
the subject, you completely misrepresented the earlier opinions in that
ticket, so if you could resist doing that in the future it would no
doubt help your causes).

There are tickets that have been open longer than yours and many that
affect more people. Perhaps you could consider that we might be
addressing those in preference to yours in the limited time we have
available, particularly over the holiday season.

Best wishes,
Malcolm

rndblnch

unread,
Jan 5, 2009, 5:06:11 AM1/5/09
to Django developers
On Jan 5, 12:45 am, Malcolm Tredinnick <malc...@pointy-stick.com>
wrote:
> On Sat, 2009-01-03 at 08:25 -0800, rndblnch wrote:
>
> [...]
>
> > bump, bump :)
>
> You appear to have accidentally bumped into your keyboard. You should
> try to stop doing that; you'll hurt something.
>
> We'll get to your patch in due course. If it solves your problem for
> now, use it and be happy. That will satisfy what appears to be 100% of
> the people affected by that particular problem. Personally, I'm not
> convinced that change should go in because I'm not completely
> comfortable with encouraging people to use filesystems that are broken
> (it's 2008, not 1998. If a filesystem on a Unix-like system doesn't
> support proper locking semantics, -- which means ioctl() calls -- it's
> broken for locking purposes). However that does have to be balanced with
> the pragmatism argument that people might be permitted to blow their
> feet off if they choose.

one other advantage of the last patch i submitted is that it makes the
django.core.files.storage.FileSystemStorage easier to test by making
its dependency to django.core.files.locks explicit.
the other advantage is that django.core.files.locks don't need to be
more special-cased to support each possible filesystem.
you can then have a short list of "officially" supported filesystems
and let the user take the risk of using another one.

anyway, i won't push this change anymore, i understand your point of
view.
if needed i will keep applying my patch after each django upgrade.
at least, the patch is attached to the ticket and the workaround is
documented if somebody face the same problem.

> So whilst I'm aware of the ticket, I'm still
> thinking about whether it's a good thing to apply (and, whilst I'm on
> the subject, you completely misrepresented the earlier opinions in that
> ticket, so if you could resist doing that in the future it would no
> doubt help your causes).

sorry about that, i'm not fluent in english, i may have not properly
understand something, or may have failed to correctly express my point
of view.
if i have hurt you in any way, i sincerely apologies.

> There are tickets that have been open longer than yours and many that
> affect more people. Perhaps you could consider that we might be
> addressing those in preference to yours in the limited time we have
> available, particularly over the holiday season.

sure, once again i didn't want to be rude.

> Best wishes,
> Malcolm

best wishes for 2009,
renaud
Reply all
Reply to author
Forward
0 new messages