Project

General

Profile

Bug #38

Use transactions within SqliteStorage backend

Added by Sputnick almost 17 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Quassel Core
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Version:
0.13.1
OS:
Any

Description

At the moment, the SqliteStorage backend does not support transactions. Unfortunately, adding logDb.transaction() at the necessary places does not help. The problem is, that prepared statements (probably SELECT statements only) seem to stay active until they are cleared/deleted. And Sqlite cannot commit while active statements exist.

So if we don't find a better way, we will probably have to get rid of prepared statements.

History

#1 Updated by EgS almost 17 years ago

Actually we just got rid of the transactions. :)

In Sqlite Transactions are only helpflul to execute multiple statements as one atomic transaction. This is helpful in 2 cases:
1.) while a previous insert/update/delete was successfull a succeding statement might fail. In this case a rollback is quite handsome. The maximum depth used in our database is about 3 which can easily be managed manualy.
2.) concurrent access. Since the backend itself is singlethreaded and multiclient access to the sqlite database itself is not allowed this does not concern us.

Preparedstatements allows a speedup when executing the same statement multiple times. Since this is a chatclient we might have a lot of incoming data and thus lots of inserts. Therefore transactions have been removed.

Also available in: Atom PDF