[Interest] sqlite

Alejandro Exojo suy at badopi.org
Fri Apr 17 17:21:38 CEST 2015


El Friday 17 April 2015, Bo Thorsen escribió:
> > In practice, we found that it results in problems in practise, even if
> > it may work in theory. Perhaps it is due to the actual sqlite, perhaps
> > it is due to the fact that it really is just a file and it is the
> > (networked) file access that is to blame in the end in our case, but the
> > problems are real.
> 
> According to the same documentation, it does not work if the file is on 
> a networked file system. So if the OP use a local file system only, then 
> it might still work.

Yes, this is covered in the FAQ:

http://www.sqlite.org/faq.html#q5

"SQLite uses reader/writer locks to control access to the database. (Under 
Win95/98/ME which lacks support for reader/writer locks, a probabilistic 
simulation is used instead.) But use caution: this locking mechanism might not 
work correctly if the database file is kept on an NFS filesystem."

And more details:
http://www.sqlite.org/lockingv3.html

However, the Akonadi folks might not agree very much on how reliable this 
locking is (even on not networked file systems). KDE users disliked a lot 
having to depend on a server DBMS for their PIM apps, and prefer the lack of 
setup of sqlite, but they still have this in the Akonadi pages:

https://techbase.kde.org/Projects/PIM/Akonadi#Why_not_use_sqlite.3F

"Why not use sqlite? We tried. Really. It just can't handle the concurrent 
access very well."

https://techbase.kde.org/Projects/PIM/Akonadi/Database#Sqlite

"Requires newer version than the default Qt one."
"Requires patched QtSql driver to fix concurrency issues"
"Mutex-based transaction serialization in Akonadi (required because SQlite's 
support of concurrency might not be enough)"

So, yes, in theory it works, but in practice I see many people complaining 
about the reliability of it. :-(

-- 
Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2
http://barnacity.net/ | http://disperso.net



More information about the Interest mailing list