Issue 55496 - embedded databases are prone to data loss
Summary: embedded databases are prone to data loss
Status: CONFIRMED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: 680m130
Hardware: All All
: P2 Trivial with 6 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-05 12:28 UTC by Frank Schönheit
Modified: 2013-08-07 15:45 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Frank Schönheit 2005-10-05 12:28:54 UTC
Embedded (HSQLDB) databases are prone to data loss in case of abnormal
terminations of the OOo process.

That is, if you write data into a database (by UI or by scripting), this data is
not immediately commited to the database (the .odb) file, but still stored in
some temporary location. If now OOo terminates (crashs, or is killed)
abnormally, then this data is lost - not even the document recovery which
(perhaps) offers to restore the database upon next start does catch the data.

This is certainly undesired behavior for a database.

While it's difficult to fix this with our current approach, where the data is
just some sub-streams in a ZIP package, we need to somehow address this. I fear
this might in fact only be possible with a package format (replacing the ZIP
package format for this purpose) which allows O(1) random access to all of its
parts.

For the record: We tried to relax the situation for OOo 2.0.1 with fixing issue
55493: we introduced a few places where the changes in the DB data are synced
back to the .odb file. They're (hopefully) often enough to significantly reduce
the chance for a data loss, and seldom enough to be seriously noticed.
Nevertheless, this is not really a final solution.
Comment 1 fabianklabunde 2006-11-28 17:10:30 UTC
For the time being it would be helpful to know the "places where the changes in
the DB data are synced back to the .odb file". That way one might be able to
secure one´s data without shutting OOo down. 
Fabian 
Comment 2 Frank Schönheit 2006-11-30 11:26:11 UTC
This is basically every time you release a connection in the data source browser
(the thingie you get with "F4" in the other apps), and when you close a table or
query view.
Comment 3 Frank Schönheit 2006-11-30 11:27:24 UTC
Additional note: If you want to programmatically want to sync back the changes,
call XFlushable::flush at a connection object.
Comment 4 helgekraak 2006-12-12 22:54:32 UTC
This may help some OO users:
http://www.oooforum.org/forum/viewtopic.phtml?t=43786&start=15