View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004071 | MMW v4 | DB/FileMonitor | public | 2007-12-04 12:58 | 2009-09-17 14:30 |
Reporter | jiri | Assigned To | |||
Priority | immediate | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 3.0 | ||||
Fixed in Version | 3.0 | ||||
Summary | 0004071: Increase security of DB operations | ||||
Description | SQLite has several options of how to modify database, ranging from slower/more secure to faster/less secure. They are named: FULL, NORMAL and OFF. Their description from SQLite documentation: --- When synchronous is FULL (2), the SQLite database engine will pause at critical moments to make sure that data has actually been written to the disk surface before continuing. This ensures that if the operating system crashes or if there is a power failure, the database will be uncorrupted after rebooting. FULL synchronous is very safe, but it is also slow. When synchronous is NORMAL, the SQLite database engine will still pause at the most critical moments, but less often than in FULL mode. There is a very small (though non-zero) chance that a power failure at just the wrong time could corrupt the database in NORMAL mode. But in practice, you are more likely to suffer a catastrophic disk failure or some other unrecoverable hardware fault. With synchronous OFF (0), SQLite continues without pausing as soon as it has handed data off to the operating system. If the application running SQLite crashes, the data will be safe, but the database might become corrupted if the operating system crashes or the computer loses power before that data has been written to the disk surface. On the other hand, some operations are as much as 50 or more times faster with synchronous OFF. --- So far we have used OFF setting (fastest) in MM, but we should give user a chance to use other settings as well. Note that I don't think that this is the reason for problems reported by some users, but still I'd rather include this. | ||||
Steps To Reproduce | Forum Topic: http://www.mediamonkey.com/forum/viewtopic.php?f=18&t=42770 | ||||
Tags | No tags attached. | ||||
Fixed in build | 1138 | ||||
|
Fixed in build 1112. I added an option to specify in MM.ini file: [System] SQLiteSafety= possible values are: 0 .. fastest 1 .. average 2 .. slowest We should document it somewhere with other 'undocumented' features. Possibly a new wiki page could be created for this purpose? |
|
Verified no obvious regressions with SQLiteSafety=1 and updated faq with documentation. |
|
I tested speed of scanning a folder using these options with these results: 0 .. 53s 1 .. 55s 2 .. 56s Since the issue of DB corruption definitely isn't nice and the difference in speed is rather negligible, I think we should try to change the default to the FULL security mode. |
|
Fixed in build 1138. |
|
Closing the bug Jiri Updated Knowledgebase to reflect changes of default behavior to SQLiteSafety=2 |