Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#309 closed Defect (wontfix)

Metadata missing when App Support/Sapphire mounted via NFS

Reported by: frl Owned by:
Priority: normal Milestone:
Component: Metadata - TV Show Version: 1.0b7
Keywords: Cc:



I've been a Sapphire user for a couple of years now so an overdue thanks for a great plugin. I have a problem that's cropped up since moving to b7 - I'll admit my usage is a bit non-standard so I'd totally understand if you close this as invalid. Can't hurt to report it though...

I have two AppleTVs, both running OS v2.4. All the Media that Sapphire indexes (about 1200 files total) is on a NAS, mounted by NFS at ~/Movies and ~/MoreMedia? on both ATVs.

I also mount ~/Library/Application? Support/Sapphire? to an NFS export on the NAS. This way, I only have to import data once and my watched / favorite files follow me around. I very rarely (if ever) have both AppletTVs on at once so I haven't seen any problems - this has worked perfectly since in b5 and b6.

Since b7 I started noticing some odd behaviour with TV metadata when the App Support/Sapphire? folder is mounted via NFS. This doesn't happen if I disable the mount and use the local folder. There is no 100% reproducible pattern but in general it appears that certain Episodes and Seasons are missing, e.g. I have all four seasons of Star Trek Enterprise, but after a full import Season 4 will only have 5 episodes in it and Season 2 will have a few episodes missing here and there. I run with Fast Directory Switching turned off normally. If I switch that on, the visible Episodes changes – typically only 1 Episode will be displayed in each Season – but again this is not 100% reproducible. If I view the folder via Collections, all files are all present and correct. This pattern occurs in most, but not all Shows.

There are no errors in console.log so other than this description I'm not sure what other evidence I can provide - but I'm more than happy to do any work I can if it will help resolve this.



Attachments (1)

sapphire_syslog.txt (1.8 KB) - added by frl 8 years ago.

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by frl


comment:1 Changed 8 years ago by frl

update - I installed syslog and was able to pull some error details out - a sample of which are in the attached file. Most are of the type:

"NSInternalInconsistencyException: statement is still active"

comment:2 Changed 8 years ago by gbooker

I suspect this is due to two different devices accessing the database simultaneously. The NSInternalInconsistencyException is consistent with the database being used by two processes. Unfortunately, CoreData is not designed for concurrent access, which is likely the cause of this issue.

comment:3 Changed 8 years ago by frl

Thanks gbooker, that would make sense. I got the same behaviour with only one of the two ATVs switched on but I guess that could be down to NFS being handled differently to local files - I don't know enough about NFS to know if that's the case though.

I'll look for another solution to provide similar functionality, perhaps rsync.

Again, thanks for a great plugin!


comment:4 Changed 8 years ago by gbooker

  • Resolution set to wontfix
  • Status changed from new to closed

I have been working on a mechanism to do multiple machines on the same DB correctly. It would require a master machine, running ATV or Mac OS X, to be running at all times. I'm still working out the details of the design, and I haven't even tested any of the mechanisms yet, so it'll be a while coming. It will likely be beta 8 or so.

In the mean time, rsync should work. The DB is just a sqlite database, so no fancy resource forks or anything like that. I think that you had one of your ATVs lock the DB, and the other one griped about it.

In the mean time, I'll just mark this ticket as wontfix since solving the underlying issue will bypass this one (you may continue to comment on closed tickets if you like).

comment:5 Changed 8 years ago by frl

Thanks gbooker, I'll keep an eye on the svn for the "right" way to handle this.

If it's of any interest to anyone else in the meantime, rsync works nicely, albeit not quite as transparent as sharing a db directly. I ended up setting up a StartupItem? to download the db via rsync from my NAS, and configuring iScripts with a script to upload the local db to the NAS which I run before powering down either ATV (or after any significant change to the db). In theory the ATV will always be pulling down the 'latest' db at power on, so long as you remember to upload it after any changes. Just try not to have both ATVs on at once :)



Note: See TracTickets for help on using tickets.