Ticket #2627 (closed defect: fixed)

Opened 7 years ago

Last modified 6 years ago

Datastore should check versions and recreate indexes automatically.

Reported by: jg Owned by: tomeu
Priority: high Milestone: 8.2.0 (was Update.2)
Component: sugar-datastore Version: Development build as of this date
Keywords: Cc: kimquirk, marcopg, tomeu
Action Needed: Verified: no
Deployments affected: Blocked By:

Description (last modified by jg) (diff)

Build 541 upgraded from build 540 via the upgrade path would not put up the USB icon in the journal.

Deleting the index files from the USB key "fixed" the problem; the key would then be recognized and the icon on the journal restored.

I think we need version checking of the datastore index files implemented so that these sorts of failures don't happen in the field; the old index should be removed (or potentially converted), and the index rebuilt.

Change History

Changed 7 years ago by jg

  • description modified (diff)

Changed 7 years ago by tomeu

  • cc tomeu added; tomeau removed

Ben, I thought your commit 21b3150356031bfed0e833d148c4f370364c3164 of Fri, 27 Jul 2007 fixed this.

Changed 7 years ago by bcsaller

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

Changed 7 years ago by tomeu

  • status changed from closed to reopened
  • resolution deleted

Mounting an usb device failed because of this:

DBusException: org.freedesktop.DBus.Python.xapian.DatabaseCorruptError: Traceback (most recent call last):
  File "/home/tomeu/sugar-jhbuild/build/lib/python2.5/site-packages/dbus/service.py", line 664, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/home/tomeu/sugar-jhbuild/build/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 76, in mount
    mp = self.connect_backingstore(uri, **_options)
  File "/home/tomeu/sugar-jhbuild/build/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 168, in connect_backingstore
  File "/home/tomeu/sugar-jhbuild/build/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 74, in initialize_and_load
  File "/home/tomeu/sugar-jhbuild/build/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 456, in load
    super(InplaceFileBackingStore, self).load()
  File "/home/tomeu/sugar-jhbuild/build/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 244, in load
  File "/home/tomeu/sugar-jhbuild/build/lib/python2.5/site-packages/olpc/datastore/xapianindex.py", line 84, in connect
    self.write_index = secore.IndexerConnection(repo)
  File "/home/tomeu/sugar-jhbuild/build/lib/python2.5/site-packages/secore/indexerconnection.py", line 46, in __init__
    self._index = _xapian.WritableDatabase(indexpath, _xapian.DB_CREATE_OR_OPEN)
  File "/home/tomeu/sugar-jhbuild/build/lib/python2.5/site-packages/xapian.py", line 2759, in __init__
DatabaseCorruptError: Cannot open tables at consistent revisions

Changed 7 years ago by marco

Tomeu, is this actually a blocker? Do you think you could come up with a patch since Ben is in vacation?

Changed 7 years ago by tomeu

  • owner changed from bcsaller to tomeu
  • status changed from reopened to new

After I come up with a fix for #3180, usb devices will be reindexed and mounted after a failure.

I'm more worried about the flash index, but I think the datastore format didn't changed between trial2 and trial3.

Changed 7 years ago by kimquirk

  • priority changed from blocker to high

Changed 7 years ago by tomeu

A fix for #3180 has been pushed for Trial-3. For version mismatches, we will recreate the index (but loose all existing metadata).

I think we didn't change the index format for Trial-3, but would be good that someone tests the upgrade process from Trial2 to Trial3 and check we don't loose data in the process (#3389).

Changed 7 years ago by tomeu

  • owner changed from tomeu to bcsaller
  • milestone changed from Trial-3 to Untriaged

Changed 7 years ago by kimquirk

  • milestone changed from Untriaged to First Deployment, V1.0

Changed 7 years ago by kimquirk

For FRS, can the datastore provide information if the USB is corrupted. Maybe the indexes should be more transactional.

Changed 6 years ago by marco

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

The specific bug is fixed.

Note: See TracTickets for help on using tickets.