Picon

Sqlite and Windows DFS

One of my University customers uses a Sqlite database in a teaching
lab with up to 50 students. It is one of 10-20 similar customers but
is the only one who appears to have the problem of regularly
experiencing "Database is malformed" errors. These databases are
configured so practically all the students' work is saved in their own
'private' Sqlite partition in their Home directories.  The only part
of the main database that they write to  is a user-registrations table
to update their settings and activity records when they log out. It's
suspicious that the database corruptions all seem to be related to
this table.

I have discovered that here the database is installed on a Windows
server with DFS (Distributed File System) which from a quick read of
Wikipedia implies there could be several copies of the database (which
appears to the OS as a single file) which are somehow magically kept
in sync. However, my university contact tells me

> all student desktop systems “should” be pointing to the same primary active path so will always
contact the same instance of the database.

Does anyone have any experience or thoughts on the subject?

Currently using Python 2.5.4, pysqlite 2.3.2 and sqlite 3.42 but could
upgrade to Python 2.7.2 with pysqlite 2.6.0 and sqlite 3.4.2 (or even
3.7.8) fairly easily if it would help.

--
Regards

David Hughes
(Continue reading)

Roger Binns | 12 Oct 2011 16:58

Re: Sqlite and Windows DFS


On 12/10/11 07:43, dfh@... wrote:
> I have discovered that here the database is installed on a Windows 
> server with DFS (Distributed File System) which from a quick read of 
> Wikipedia implies there could be several copies of the database (which 
> appears to the OS as a single file) which are somehow magically kept in
> sync.

If you are using DFS then you are using a networked file system.  There is
no known networked file system that always works correctly with SQLite.
The usual symptom is a corrupted database.

The underlying cause is that the various network file systems out there
all have minor bugs or various places where their consistency and locking
is a little relaxed.  This proves deadly when using SQLite.

Roger

Gmane