home / django_tickets / tickets

tickets: 8403

This data as json

id created changetime last_pulled_from_trac stage status component type severity version resolution summary description owner reporter keywords easy has_patch needs_better_patch needs_tests needs_docs ui_ux
8403 2008-08-19 00:21:53 2011-09-28 16:12:17 2022-03-06 03:42:10.349070 Accepted closed File uploads/storage     dev fixed Current file locking does not work on NFS mounts The code in `django.core.files.locks` assumes that `flock()` is safe to use on every POSIX system to lock files. This isn't the case when the filesystem in question is a relatively recent NFS system. In that case, `flock()` actively raises an error (rather than potentially silently failing to lock things, which was the older behaviour). For those situations `fnctl()` should be used to do file locking. From a bit of a search around and some source reading (plus some comments on the Mailman list, although I've avoided reading the relevant code there for the moment, since it's GPL and I might end up being the person who fixes this ticket), it looks like posixfile.lock() in the Python source is an appropriate way to do this. I realise the `locks.py` file isn't our source, but it is broken in this respect and we do include it. So we have to fix it, since, right now, you can't save files to an NFS-mounted filesystem. This effect in Django was initially noticed in [http://groups.google.com/group/django-users/browse_thread/thread/384c3ec44672cb02 this django-users thread]. mtredinnick mtredinnick file lock 0 0 0 0 0 0
Powered by Datasette · Queries took 1.017ms