[mythtv] Convoluted program expiry and deletion

Michael T. Dean mtdean at thirdcontact.com
Thu May 10 14:37:59 UTC 2012


On 05/10/2012 09:55 AM, Ian Dall wrote:
> I have been trying to debug the program deletion code (Ticket #10704).
> However, this post is really about how convoluted the program deletion
> actually has become and some suggestions for small improvement.
>
> As I was debugging I took some notes about how the process works (or
> doesn't). It looks to me like the "Change delete behaviour so that we
> always use the deleted recording group" commit
> f78f9992d754390fa42f109e5139b8eaf224d076, has left some artefacts which
> may have made sense once, but now seem pointless. The whole process
> seems excessively complicated.

We appreciate the work you've done on tracking the existing code, but I 
thought I'd just send a quick e-mail to give you a bit of info on why 
we're where we are.

In the past, we had an option that allowed users to decide whether to 
delete recordings immediately or to just place them in the Deleted 
recording group so that they would later be expired when the file system 
was full.  Recently, we also had a "user-experience" issue that cropped 
up due to attempts to prevent problems like orphaned files and/or 
metadata, where if a recording was in use for anything--including 
preview creation (which is often run immediately after exiting a 
recording--deletion wasn't permitted.  This meant that in many cases, 
users would attempt to delete a recording and be told they couldn't 
because the recording was in use (meaning they'd have to wait until 
later and try again).

Therefore, (very) shortly before the release of 0.25, we decided to 
switch the code to always use the "delete to Deleted recording group" 
approach (which can be done, even when the recording is in use).  This 
solved the major user-visible issue, but--as you've noticed--means that 
our deletion code has a lot of unnecessary complexity.

The plan is to simplify the code, but we didn't have time to do so (let 
alone time for fully testing a complex change) before 0.25 release.  
Your e-mail should be very useful in helping to do so, once we get a 
chance to work on it.

Mike


More information about the mythtv-dev mailing list