[Xapian-tickets] [Xapian] #486: add_document() followed by failing replace_document() leaves partial changes

Xapian nobody at xapian.org
Fri Jun 4 23:34:47 BST 2010


#486: add_document() followed by failing replace_document() leaves partial
changes
---------------------------+------------------------------------------------
 Reporter:  olly           |       Owner:  olly 
     Type:  defect         |      Status:  new  
 Priority:  normal         |   Milestone:  1.2.1
Component:  Backend-Chert  |     Version:  1.2.0
 Severity:  normal         |    Keywords:       
Blockedby:                 |    Platform:  All  
 Blocking:                 |  
---------------------------+------------------------------------------------

Comment(by richard):

 One solution would be for modification methods like add_document() and
 replace_document() to call cancel() if an error occurred, to rollback any
 changes since the last flush.  This would stop the database getting into
 an inconsistent state on error, but might roll back more changes than
 really desired.

 Alternatively, this could be done after a basic validation of the document
 (ie, checking that the term lengths aren't too long), so a full roll-back
 only happened if an error occurred after that validation (if validation
 failed, the current modification operation would be stopped before any
 changes were made, but earlier modifications would not be rolled back).

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



More information about the Xapian-tickets mailing list