[Xapian-tickets] [Xapian] #317: Database corruption after disk-full error

Xapian nobody at xapian.org
Thu Dec 18 01:44:45 GMT 2008


#317: Database corruption after disk-full error
---------------------------+------------------------------------------------
 Reporter:  richard        |        Owner:  richard
     Type:  defect         |       Status:  new    
 Priority:  normal         |    Milestone:  1.0.10 
Component:  Backend-Flint  |      Version:  1.0.7  
 Severity:  normal         |   Resolution:         
 Keywords:                 |    Blockedby:         
 Platform:  All            |     Blocking:         
---------------------------+------------------------------------------------

Comment(by richard):

 Applying fix1.patch also changes the behaviour of the test run described,
 such that it doesn't result in a corrupt database.  Instead, it produces
 the output:

 {{{
 0
 Modifications failed (DatabaseError: Error writing to file (No space left
 on device)), and cannot set consistent table revision numbers: Couldn't
 reread base A
 Couldn't reread base A
 Traceback (most recent call last):
   File "/home/richard/xaptest.py", line 17, in <module>
     db.add_document(doc)
 xapian.DatabaseCorruptError: Couldn't reread base A
 }}}

 And leaves the database listing as:
 {{{
 total 102770
 -rw-r--r-- 1 richard richard        0 2008-12-18 01:40 flintlock
 -rw-r--r-- 1 richard richard       12 2008-12-18 01:38 iamflint
 -rw-r--r-- 1 richard richard      951 2008-12-18 01:38 position.baseB
 -rw-r--r-- 1 richard richard 68063232 2008-12-18 01:40 position.DB
 -rw-r--r-- 1 richard richard      564 2008-12-18 01:38 postlist.baseB
 -rw-r--r-- 1 richard richard 35815424 2008-12-18 01:40 postlist.DB
 -rw-r--r-- 1 richard richard        0 2008-12-18 01:40 postlist.tmp
 -rw-r--r-- 1 richard richard        0 2008-12-18 01:39 record.baseA
 -rw-r--r-- 1 richard richard       16 2008-12-18 01:38 record.baseB
 -rw-r--r-- 1 richard richard    98304 2008-12-18 01:40 record.DB
 -rw-r--r-- 1 richard richard       25 2008-12-18 01:38 termlist.baseB
 -rw-r--r-- 1 richard richard   745472 2008-12-18 01:40 termlist.DB
 -rw-r--r-- 1 richard richard       16 2008-12-18 01:38 uuid
 -rw-r--r-- 1 richard richard       16 2008-12-18 01:38 value.baseB
 -rw-r--r-- 1 richard richard    98304 2008-12-18 01:40 value.DB
 }}}

 The idea of this patch is that, by reopening all the tables, we get the
 database back into a consistent state, thus avoiding the risk of
 corruption.  I'm not sure if this is fully safe, but it looks promising to
 me.  Comments welcome...

-- 
Ticket URL: <http://trac.xapian.org/ticket/317#comment:2>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list