Check .actors dir exists before listing, to avoid produce error log, fix #14210 #2493

Merged
merged 1 commit into from Apr 9, 2013

Projects

None yet

6 participants

@ulion
Collaborator
ulion commented Mar 24, 2013

this should fix http://trac.xbmc.org/ticket/14210
but I just wonder, why the error log produced for multiple times for the same dir, is there multiple video files inside the dir?

@elupus
Member
elupus commented Mar 24, 2013

Fix the file system to not log an error on not exist instead.

@ulion
Collaborator
ulion commented Mar 24, 2013

No, CDirectory::GetDirectory report error is correct behavior. but here we should only call CDirectory::GetDirectory when the dir exists.

@arnova
Member
arnova commented Mar 24, 2013

I'm surprised we haven't noticed this before, are we sure this is really the issue at play here?

@ulion
Collaborator
ulion commented Mar 24, 2013

we need wait the reporter to try out, maybe his smb is readonly so the actors never saved there or be deleted?

@MartijnKaijser
Member

I've seen this happening (when i cared to look) too once on my system with writeable smb://
The problem probably is that the folders don't even exist and the the log keith showed is from a tv series so there are multiple video files in that folder.

@elupus
Member
elupus commented Mar 24, 2013

It's much more overhead to do the exist check than just accepting an error
from getdirectory...

@ulion
Collaborator
ulion commented Mar 24, 2013

exists is a stat, listing is an open. we are not in python to try...expect which can ignore the error output, and stat has cache there's no much overhead as you thought. besides, we can add cache support to the CDirectory::Exists to use directory cache to speed up.

@t-nelson

Do hundreds of them over a slow network. Overhead aplenty.

@ulion
Collaborator
ulion commented Mar 25, 2013

I don't think the .actors dir exists on 'slow network', it should not
happen. we are talking smb which is in LAN.
besides, we should consider use directory cache for the dir existence check.

@ulion
Collaborator
ulion commented Mar 25, 2013

Or I should change the pr title to state it only point to a certain
usage place not generic cases.

@ulion
Collaborator
ulion commented Mar 25, 2013

sorry for the old generic title misleading, this is a specific fix for a specific place which calling GetDirectory on .actors subdir without check Exists first.

@MilhouseVH
Collaborator

I'm seeing this ".actors" error plenty when scraping movies over NFS. So it's not just TV Shows, but movies too, and not just SMB but NFS too. I don't have any .actors directories, yet the scraper is chucking out this "error" message for every movie. Either check it exists before using it, or suppress the "error" message when it doesn't exist and it's not a problem that it doesn't exist.

@ulion ulion merged commit e59356d into xbmc:master Apr 9, 2013
@MilhouseVH
Collaborator

Did this patch make it in to 12.2? I'm still seeing the .actors error being logged while scanning in a new library with OpenELEC x86 3.0.2 which is supposedly XBMC 12.2, or is this patch only for Gotham?

21:22:26 T:140119973873472  NOTICE: Starting XBMC (12.2 Git:32b1a5e), Platform: Linux (OpenELEC (official) - Version: 3.0.2, 3.7.10 x86_64). Built on May  2 2013
...
21:24:28 T:140119650768640   ERROR: GetDirectory - Error getting /storage/freenas/media/Video-Private/MoviesHD/.actors
21:24:41 T:140119650768640   ERROR: Previous line repeats 1 times.
...
21:29:58 T:140119650768640   ERROR: GetDirectory - Error getting /storage/freenas/media/Video-Private/TVShows/The Killing/.actors
21:30:24 T:140119650768640   ERROR: Previous line repeats 40 times.
@MartijnKaijser
Member

@MilhouseVH
not in 12.2

@MilhouseVH
Collaborator

OK thanks.

@ulion
Collaborator
ulion commented May 4, 2013

sorry for missed this, I was using github issue label to trace commits should be backport, but we closed the 'Issue' tab month ago so I forgot to do that for 12.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment