Re: Core Data : Opt Out of SQLite WAL is nullified after File > Duplicate ?
Re: Core Data : Opt Out of SQLite WAL is nullified after File > Duplicate ?
- Subject: Re: Core Data : Opt Out of SQLite WAL is nullified after File > Duplicate ?
- From: Jerry Krinock <email@hidden>
- Date: Tue, 21 Jan 2014 07:06:16 -0800
On 2014 Jan 20, at 09:50, Sean McBride <email@hidden> wrote:
> I opt out of WAL in configurePersistentStoreCoordinatorForURL:ofType:modelConfiguration:storeOptions:error:, but my official buildbot is not actually linking against the 10.9 SDK yet, so my experience may not count for much.
Hmmm, I do it in -[NSPersistentStoreCoordinator addPersistentStoreWithType:configuration:URL:options:error:].
OK, I’m making up a demo project to see if I can reproduce this.
> I don't get your comment here. You don't think users of newer OS X versions expect to be able to move documents around?
The trouble occurs if a developer of an older Core Data app begins to link against the 10.9 SDK, and allows the *new* default journal_mode = write-ahead logging to be used, but does not migrate the app’s document to use the new “file package” format. As far as the user is concerned, the document file is still the sqlite database file. The user may think that the -shm and -wal files, which are occasionally produced by sqlite, and appear along side the document file, are junk. If such a user moves the document file without moving the -shm or -wal file, or trashes the -shm or -wal file, data corruption can occur.
So, that is why Apple provided the new option to opt out of write-ahead logging, and why it is important that it works in all cases.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden