Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 441596 - Change the default DB backend for app-office/akonadi-server
Summary: Change the default DB backend for app-office/akonadi-server
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-03 17:06 UTC by Matija "hook" Šuklje
Modified: 2013-02-11 15:43 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matija "hook" Šuklje 2012-11-03 17:06:05 UTC
According to KDE’s Techbase, MySQL is the prefered DB backend for desktop systems and SQLite, due to many constraints only prefered for embedded devices.

Satus quo in 1.8.0 is that we have a USE="+sqlite". I think we should at least re-think this choice.


info: http://techbase.kde.org/Projects/PIM/Akonadi/Database
Comment 1 Maciej Mrozowski gentoo-dev 2012-11-03 18:33:12 UTC
Sqlite backend was made default on purpose in Gentoo. Nothing changed since then.
Comment 2 Matija "hook" Šuklje 2012-11-03 18:43:36 UTC
(In reply to comment #1)
> Sqlite backend was made default on purpose in Gentoo. Nothing changed since
> then.

Is there any reasoning know behind this decision?
Comment 3 Maciej Mrozowski gentoo-dev 2012-11-04 22:18:35 UTC
All it comes down to dependencies. MySQL, full blown database server being high calibre dependency just for PIM 'cache' data - because this is essentially what Akonadi needs this storage for - no data is stored there for persistency purpose, it's just a cache for Akonadi data providers. Default KDE desktop, suggested by KDE developers requires two full blown database servers running - MySQL for Akonadi and Virtuoso OSE for Nepomuk. In Gentoo we just disagree with KDE developers on what's the best for our users by default, of course you can disagree with our judgement :)
Besides it's still just a default, one can still override it by USE flag.
Comment 4 Matija "hook" Šuklje 2012-11-06 19:37:07 UTC
(In reply to comment #3)
> All it comes down to dependencies. MySQL, full blown database server being
> high calibre dependency just for PIM 'cache' data - because this is
> essentially what Akonadi needs this storage for - no data is stored there
> for persistency purpose, it's just a cache for Akonadi data providers.
> Default KDE desktop, suggested by KDE developers requires two full blown
> database servers running - MySQL for Akonadi and Virtuoso OSE for Nepomuk.
> In Gentoo we just disagree with KDE developers on what's the best for our
> users by default, of course you can disagree with our judgement :)
> Besides it's still just a default, one can still override it by USE flag.

That makes a lot of sense.

I’m just worried about the issues KDE states for avoiding SQLite in that document:
- Requires newer version than the default Qt one.
- Requires patched QtSql driver to fix concurrency issues (Akonadi ships a fork of the driver with the necessary changes)
- Slower than MySQL, based on our measurments about 2-5x on the query level, but still in the milliseconds range, so that's probably not a big issue.
- Mutex-based transaction serialization in Akonadi (required because SQlite's support of concurrency might not be enough) can block clients while background operations such as a IMAP sync are going on. This is the real killer here, the more clients (including background processes like indexing) are accessing the data, the more blocking you experience.

Are those already fixed (in Gentoo)?

If so, it seems very logical to have SQLite as default. If not, an elog notice might be nice.
Comment 5 Matija "hook" Šuklje 2012-11-09 21:40:53 UTC
Apparently there are more and more applications making use of Akonadi, so I guess we’ll have to see how this develops.

https://identi.ca/notice/97785491
Comment 6 Christian Loosli 2012-11-22 18:50:16 UTC
I recently updated to KDE 4.10 Beta1  (including the new version of akonadi-server), the sqlite backend there is making the whole KDEPIM applications unusable. 

It locks itself up on a regular base, and then blocks all applications trying to access it. 

Switching to the MySQL backend solved this for me. Maybe this is because it is still a beta, maybe something on my system was broken. But if this is how it is going to be in 4.10 for everyone, then I'd suggest changing the default useflag to the backend the KDE developers recommend. 

People not wanting mysql can still change the USEFlag then. Because having a not-at-all working PIM stack is hardly what the user wants.
Comment 7 Maciej Mrozowski gentoo-dev 2012-11-26 23:55:20 UTC
I observed lockups with akonadi-server-1.8.80 as well. I would hardly called it a bug in SQLite though. Let's see how final akonadi-server release comes out.
Comment 8 Manuel Nickschas 2013-01-06 17:26:30 UTC
In my own experience, Akonadi has tons of issues with sqlite, while it seems to work flawlessly with MySQL. All the people who told me that they have random crashes, database lockups, etc where running sqlite.

I also had lots of issues a while ago with sqlite, which all went away when I switched back to MySQL, and I have now a very pleasant Akonadi experience even on my laptop with shaky network connection. So regardless of dependencies, this should be the default on Gentoo.

This also matches upstream's opinion that the sqlite backend is not mature enough to be used productively.
Comment 9 Manuel Nickschas 2013-01-06 17:31:43 UTC
I should add that my own experience dates from a few months ago, so if it was recently fixed, I wouldn't know. I didn't feel like trying out sqlite again after finally having a stable and working Akonadi with MySQL...
Comment 10 Michael Palimaka (kensington) gentoo-dev 2013-01-15 16:02:38 UTC
(In reply to comment #8)
> In my own experience, Akonadi has tons of issues with sqlite
> [..]
> I also had lots of issues a while ago with sqlite, which all went away when
> I switched back to MySQL, and I have now a very pleasant Akonadi experience
> [..]
> This also matches upstream's opinion that the sqlite backend is not mature
> enough to be used productively.

I agree completely.
Comment 11 Chris Reffett (RETIRED) gentoo-dev Security 2013-01-17 19:49:12 UTC
KDE team voted to change the default DB backend to MySQL.
Comment 12 Michael Palimaka (kensington) gentoo-dev 2013-02-11 15:43:19 UTC
This was done in akonadi-server-1.9.0.