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: Sean McBride <email@hidden>
- Date: Tue, 21 Jan 2014 11:11:41 -0500
- Organization: Rogue Research Inc.
On Tue, 21 Jan 2014 07:06:16 -0800, Jerry Krinock said:
>On 2014 Jan 20, at 09:50, Sean McBride <email@hidden> wrote:
>
>> I opt out of WAL in configurePersis
>tentStoreCoordinatorForURL:ofType:mod
>elConfiguration: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:].
As per this:
<http://lists.apple.com/archives/cocoa-dev/2013/Nov/msg00006.html>
>OK, I’m making up a demo project to see if I can reproduce this.
Cool. If you do, let us know so we can file dupes. :)
>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.
Oh! Is that the case? The release notes don't mention anything like that. So basically they expect/require you to use file packages? And yet NSPersistentDocument doesn't even support file packages! It's right there in the docs:
"Important: NSPersistentDocument does not support some document behaviors:
File wrappers.
See File Wrappers with Core Data Documents for an example of how you can add support for file wrappers."
Then you go to that sample code and it says:
"Retired Document. This sample code may not represent best practices for current development"
What should we be concluding here? :(
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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