Exceptions and corruptions

Apr 21, 2011 at 6:29 PM

Just wondering how likely exceptions will result in a corrupt database?

Things such as running out of disk space, and then saving extra data to the database.. Is this likely to result in a major headache?

 

Coordinator
Apr 21, 2011 at 7:25 PM

Exceptions can result in a corrupt database. Most common scenario is that you would have your keys and indexes out of synch. It could be a major headache if it happened, yes, and is something to explore building into future versions. Right now Sterling is not transactional so that is a risk with using it. Fortunately the next version has far better facilities for updating indexes/keys etc. to potentially repair a corrupt database.

Apr 21, 2011 at 11:23 PM

Can the keys and indexes get out of sync if the user taps the start button on WP7 while I'm saving data in a thread? Or is it enough to call flush in the deactivated event to prevent any problems?

Coordinator
Apr 23, 2011 at 8:44 PM

If you follow the pattern recommended in the documentation for the phone, the indexes/keys should automatically flush on a tombstone event and keep the database in synch.

Apr 26, 2011 at 10:47 PM
jeremylikness wrote:

Exceptions can result in a corrupt database. Most common scenario is that you would have your keys and indexes out of synch. It could be a major headache if it happened, yes, and is something to explore building into future versions. Right now Sterling is not transactional so that is a risk with using it. Fortunately the next version has far better facilities for updating indexes/keys etc. to potentially repair a corrupt database.

Hello

I also have problem with corrupted database. You mentioned new version, you mean 1.4beta?

Bye

Coordinator
Apr 26, 2011 at 11:09 PM

Yes. The 1.4 beta includes the refresh command to reload indexes/keys from disk, for example, and requires fewer files to synchronize (i.e. no database nor table master) so less overhead there.