Hi,
We developed an application which base on SQLite3. It is running on ARM
processor with Linux 2.6.37 (no, there is no easy way to upgrade it). We
put our database on microSD card (industrial grade, very reliable)
formatted with ext4 partition. The database is used in WAL mode with
default settings. Database schema is relatively simple: two tables, from
which one stores only point names and the other is heavily used to store
incoming data points. To speed up searching the data table, we setup
R*tree indexes separately for each name (let say around 200 R*tree
indexes). The problem is we occasionally observe database corruption and
whole database becomes rubbish. The problem is very rare and occurs only
(as far as we were able to confirm so far) if there is a power lose
during write to the database. We have chosen WAL mode to allow read
access to database during writing and also for performance reasons
(database is on SD card and we run on embedded system). It is not yet
confirmed for sure, but most likely the problem occurs only if reader
and writer access the database at the same time and power lose occurs.
We admit there may be a problem with SD drivers, POSIX mutex
implementation or ext4 driver (we are running relatively old version of
Linux kernel), however we have never observed corruption of any other
file on the same partition, even though this partition is heavily used
for other purposes (syslog, all temporary data, configuration, some
exported data files in zip format). We also use POSIX mutexes in other
programs and have never discovered any issue (apart from invalid use in
developer's code;) Does anyone know if there is any "unstable/unknown"
part of SQLite3 code which may cause this issue? We recently upgraded
SQLite to the latest version, but it did not help. I am aware we use
sort of new (maybe edge case) features, like WAL mode and R*tree
indexes. Any advice will be appreciated.
Best regards,
Greg
--
Asylia ExchangeDefender Message Security: Click below to verify authenticity
http://www.exchangedefender.com/verify.asp?id=s3AG4bIR004615&from=g.sikor...@camlintechnologies.com
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users