#4662 NORM 8.2.0 (: DataStore loses metadata between reboots

Zarro Boogs per Child bugtracker at laptop.org
Thu Jul 10 05:31:09 EDT 2008


#4662: DataStore loses metadata between reboots
-------------------------+--------------------------------------------------
   Reporter:  uwog       |       Owner:  tomeu               
       Type:  defect     |      Status:  reopened            
   Priority:  normal     |   Milestone:  8.2.0 (was Update.2)
  Component:  datastore  |     Version:                      
 Resolution:             |    Keywords:  8.2.0:?             
Next_action:  never set  |    Verified:  0                   
  Blockedby:             |    Blocking:                      
-------------------------+--------------------------------------------------
Changes (by tomeu):

 * cc: pascal (added)
  * next_action:  => never set


Comment:

 Pascal has asked me about this issue, so here comes a brain dump:

 The problem is that the DS stores info about properties in three places:
 in an in-memory dictionary, in model.py and in a xapian config file.

 When we push a yet unknown property to the DS:

  - this property gets added to the in-memory dictionary,
  - xapian (or rather the xapian bindings) tracks it and updates its config
 file.

 When we later retrieve an entry with that property, xapian will map it to
 the name we know and the DS will check in its in-memory dict if the
 property is known and which data type it has, etc.

 Now the problem happens when the DS stops and starts again, because the
 in-memory dictionary gets recreated from model.py, so it doesn't know
 anything about properties not there. So that property gets dropped with
 the results we know.

 One solution would be to store the custom properties in one more config
 file, another would be to fallback to some defaults when xapian hands us
 an unknown property.

-- 
Ticket URL: <http://dev.laptop.org/ticket/4662#comment:34>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list