3 ms·
The Sqlite database becomes corrupt ?
by mariusmg 8y ago
The Sqlite database becomes corrupt ?
- okket 8y agoI doubt it. The data is stored externally in the filesystem and referenced in the SQLite database. I guess something happens in the filesystem or during every second storing process, so that the metadata references become out of sync.
- londons_explore 8y agoI'd guess it's because someone isn't accessing it from a single thread, or isn't following the lifecycle requirements for storing data in an asynchronous datastore. You absolutely have to wait for the completion event for a write before issuing another write to the same key for example.
- tmaly 8y agomaybe they are using memory as a temp store and sync issues are popping up?
- aaaaaaaaaab 8y agoNope. CoreData has the option to store blobs as flat files, outside the SQLite DB. The DB only contains the metadata to locate the files. Looks like they're messing up these external files.
- machinecoffee 8y agoAnd I guess there's no way to create a transaction between the file system and the sqlite db. I've often thought that would be a useful feature sometimes - maybe something in the sqlite API could write your file, and then commit when verified on the filesystem.