I changed the default RPM database to Berkeley on my embedded x86 Linux system running kernel v3.4.34 and rpm-5.4.9; whereas beforehand my system was running kernel 2.6.34 and rpm-5.1.9 and the default RPM database was SQLite. I started seeing reports of RPM database failures in regards to power pulls. So I was wondering if experts on this forum had any data or recommendations in this area of using Berkeley over SQLite in regards to a system that needs to be power loss tolerant?
In my research I have come across the following manual pages: Berkeley DB recoverability
I also found that “Berkeley DB uses the same techniques for data integrity and failure recovery as the most popular enterprise relational systems on the market, and is able to provide the same reliability guarantees. These services, including two-phase locking and write-ahead logging, allow Berkeley DB to survive system failures without losing data. Recovery processing at system restart time ensures that all committed database updates are restored and available, and any interrupted work is rolled back so that it does not appear in the database.”
If this is correct, then the issue we are experiencing could be with the interface between the Linux filesystem (ext4) and the underlying storage hardware (eMMC).
The eMMC spec reads that when operating in normal data reliability mode there is some risk that previously written data may be corrupted for unforeseen events such as power interruption. Having said this, I was not quite sure if this was exactly what I had been observing in my testing. Given equal conditions why would SQLite come out better in this respect?
Aucun commentaire:
Enregistrer un commentaire