On Sat, Feb 22, 2014 at 12:19:09PM +0400, Alexey Shamrin wrote:
Hi,
That said, it's not practical to never touch DB
from outside and use
only OpenBSC VTY interface. The latter doesn't allow custom SQL
queries. Fortunately, the workaround is simple: issue `PRAGMA
journal_mode = WAL` from `sqlite3` command once, when deploying
OpenBSC.
To ask the other way around. Which queries do yo run? Do you UPDATE
subscriber structures too?
Yes, but switching the async interface alone won't
fix the 'database
is locked' problem. Only if we also switch to MySQL/Postgres. What do
you mean by "use the DB APIs directly"?
My understanding is that real and bigger deployments should use a database
server like Postgres. Currently we are using the libdbi and it doesn't
really work well with SQLite[1]. For every column we SELECT libdbi will
issue a PRAGMA to determine the type every time we query.
What I say is we need fixes and not work-arounds. The first step is
making the code aware that a database lookup can take time.
holger
[1]
http://comments.gmane.org/gmane.comp.db.libdbi.drivers/498