[mythtv] [bug?] slave backend expires current recording in process

Torsten Schenkel mythtv at isl.mach.uni-karlsruhe.de
Thu Apr 15 02:44:36 EDT 2004

Am Do, den 15.04.2004 schrieb Chris Pinkham um 5:37:
> > Maybe the problem was that the programme that was expired was the first
> > recording the slave did. Another thing I noticed: The expiring messages
> > show up on the slave's console/log not the master's.
> This would be why it was expired yes.  Each backend runs it's own expirer
> thread and expires only recordings that it made. 

OK, that's what I suspected, hence the question mark in the [bug] tag. I
tried if there was a possibility to have the slave not run the expire
code, but:

>  The autoexpire
> thread doesn't know that your master and slave share the same storage so
> it doesn't know that it could have deleted the oldest program on the
> master.

This makes it difficult.

>  If the master expirer had run first it would have expired on of
> the recordings made on the master instead of what happened.  It's an
> unintended side-effect of the two backends not being aware of the fact
> that they share storage. 

Because only the own recordngs can be expired. So there would have to be
some extra code there. Otherwise I'd have looked into removing the
expire thread from the slave. 

> I have it on my TODO list to redo parts of the
> auto-expire code to make it so that the master handles all expiring
> and so it can know whether a slave is using shared storage and if
> so find the oldest program on all backends that will free space on that
> storage.  This will take a little work though and it hasn't been a big
> problem in the past so I haven't had much incentive to go into that
> code.  I wrote the auto-expire code but personally have never had to
> use it except when testing.  I do set auto-expire on some recordings
> but my drive has never filled up to the point where Myth needs to expire.

I might get away with this, but with a 14 year old (who knows how to
schedule himself) I'd need some more filespace.

> > Is this a (known) bug or am I missing something?
> Thanks for the heads-up on this.  If someone else wants to take a look
> at enhancing this before I get to it, you could fairly easily make it
> so that if the slave is on shared storage then it doesn't run the
> auto-expire thread and also so make it so that the master can auto-expire
> any recordings it has access to not just the ones it recorded.

I'm not a coder, at least not to the degree I could comfortably fiddle
with a code like myth. Especially since I don't know C++, I'm old school
F77 :-) 
Ant timewise I don't know If I could look at it in the next days/weeks.
But could you point me (or others) to the right lines to start looking?

Walkthrough: MythTV on Epia with PVR350 using Debian:

More information about the mythtv-dev mailing list