Ticket #232 (closed defect: released)

Opened 11 months ago

Last modified 10 months ago

Flint database can be corrupted if metadata is written on its own first

Reported by: richard Owned by: newbugs
Priority: normal Milestone:
Component: Backend-Flint Version: SVN trunk
Severity: normal Keywords:
Cc: Blocked By:
Operating System: All Blocking:

Description

I've found a sequence of events which lead to a corrupt database being produced.

Attaching a patch to the testsuite which reproduces this.

Attachments

patch (0.8 kB) - added by richard 11 months ago.
Patch to testsuite to reproduce bug

Change History

Changed 11 months ago by richard

Patch to testsuite to reproduce bug

Changed 11 months ago by richard

  • status changed from new to closed
  • resolution set to fixed

This was caused by a failure to update the revision in the Flinttable_base object when commit() or cancel() was called on a lazy table which hadn't yet been created, so the newly created base file was being created at revision 0 (or whatever revision the database was originally opened at). The "corruption" resulting from this was only visible until the first commit, because after a commit, the new base file for the table was set to the correct revision number.

If a database was corrupted due to this bug, removing the newly created (and presumably empty) base file and DB file should produce a valid database.

Fixed in HEAD in SVN revision 10072.

Changed 10 months ago by olly

  • resolution changed from fixed to released

Fixed in 1.0.6.

Changed 10 months ago by trac

  • platform set to All
Note: See TracTickets for help on using tickets.