Page 1 of 1

Possible Spotlight indexing issue

Posted: Wed May 30, 2012 7:08 pm
by dagopher
I just found I'm having these log entries on my MBP running 10.6.8:

May 30 19:20:09 124 mdworker[290]: MySpotlightImporter:persistentStoreCoordinator unable to add persistent store coordinator - Error Domain=NSCocoaErrorDomain Code=513 UserInfo=0x103b2fd40 "The file couldn’t be saved because you don’t have permission."
May 30 19:20:09 124 mdworker[290]: MySpotlightImporter:importFileAtPath:attributes:type: to find object id from path /Users/gopher/Library/Caches/Metadata/CoreData/CDpedia/F8B36783-B354-4803-AFD3-50A21F28596C/CD/_records/6/1/0/p1677.pedia_md_c
May 30 19:20:09 124 mdworker[290]: MySpotlightImporter:persistentStoreCoordinator unable to add persistent store coordinator - Error Domain=NSCocoaErrorDomain Code=513 UserInfo=0x10812ace0 "The file couldn’t be saved because you don’t have permission."
May 30 19:20:09 124 mdworker[290]: MySpotlightImporter:importFileAtPath:attributes:type: to find object id from path /Users/gopher/Library/Caches/Metadata/CoreData/CDpedia/F8B36783-B354-4803-AFD3-50A21F28596C/CD/_records/6/1/0/p1678.pedia_md_c

It appears that I'm finding one set of log entries per file that lives under /Users/gopher/Library/Caches/Metadata/CoreData/${PEDIA}/. (Roughly 4000 files and about 2000 log entries. ouch.) I've tried blowing away my existing Spotlight data and re-indexing, but the log entries always appear.

Would this be related to the issue discussed on this topic: http://www.bruji.com/forum/viewtopic.php?f=5&t=4437? And if so, can I simply delete the directories ~/Library/Caches/Metadata/CoreData/${PEDIA}?

Thanks,
Gopher.

Re: Possible Spotlight indexing issue

Posted: Thu May 31, 2012 3:54 am
by Conor
I believe you have a permissions issue. Not sure if it's with the permissions of the folder and Database.cdpd file or those assigned to Spotlight. The files are created by CDpedia in a tiny/save spacing format and then the Spotlight indexer will go through and update them by reading the information directly from the CDpedia database to save space on the drive. This is were the error happens, Spotlight seems to have no permissions to read the CDpedia databases directly.

I would suggest running "Repair Permissions" on your hard drive with "Disk Utility". You could check the permissions for the following path: ~/Library/Application Support/CDpedia/Database.cdpd, by using the "Get Info" menu command and looking at the sharing section, your users should have "Read & Write" access to all those folders and final database file. Although I don't think this will help as this must be the case for CDpedia itself to be able to save changes to the database, if your user had no read or save access you wouldn't be able to use CDpedia.

Do feel free to remove the Spotlight directories /Users/gopher/Library/Caches/Metadata/CoreData/${PEDIA}/ as CDpedia will recreate them when you make some edits to an entry and it sees that the directory is missing. Could be recreating the directories will also change a setting in Spotlight letting it know it has permission to read the necessary database to gather the information.

Sorry I can't be more precise as this is the first time I seen this error.

Re: Possible Spotlight indexing issue

Posted: Sat Jun 02, 2012 4:22 pm
by dagopher
Just wanted to pass on what happened in this case: there was a problem somewhere on my Mac. I think the fsevent data was out of sync or flat out corrupted. Disk Utility didn't find any issues. Ultimately, after exhausting every other option I could think of to try I blew away those CoreData directories, deleted my old Spotlight information (/.Spotlight-V100), and my fsevent data (/.fseventd) and started over an entire new set of Time Machine backups (due to the system regenerating a new UUID for the harddrive after nuking the old fsevent data).

Now, everything works.

So, it was definitely not a Bruji issue, but rather an OSX-related issue.

thx for the help.

P.S. Now that I think about it, I should have tried deleting everything under /.fseventd/ except /.fseventd/fseventsd-uuid to avoid not losing the Time Machine backups. Oh, well, too late now.

Re: Possible Spotlight indexing issue

Posted: Sun Jun 03, 2012 11:05 am
by Conor
Thank you for the update and the solution. I am glad you are technically thorough, I myself would have never made it that far. I keep Core Data disabled as it wrecks havoc with my machine and causes a complete machine freezes about every two days, somewhere between, Mail, Backblaze and my SSD. I should give wiping the fsevent and Spotlight index a try, as having no search in Mail is an issue; I use LaunchBar for everything else.