[mythtv-users] Recordings stay in database and on disk for some time after delete?

Tom Dexter digitalaudiorock at gmail.com
Thu Feb 25 18:04:25 UTC 2010


On Thu, Feb 25, 2010 at 12:41 PM, Michael T. Dean
<mtdean at thirdcontact.com> wrote:
> On 02/25/2010 12:24 PM, Tom Dexter wrote:
>>
>> On Sun, Feb 21, 2010 at 10:31 PM, Tom Dexter wrote:
>>
>>>
>>> I upgraded to 0.22 last week.  Today I noticed some really odd
>>> behavior after deleting some recordings.  I've deleted other
>>> recordings since the upgrade and didn't notice this:
>>>
>>> I deleted 6 small SD recordings from the front end.  They were
>>> immediately removed from the list on the screen.  However when I
>>> exited the recordings screen and went back in they were still there.
>>> Not much of anything (errors or otherwise) appeared in the log.  I
>>> tried deleting them from mythweb and got similar behavior...they'd
>>> appear to delete but would still be there if I refreshed.  I checked
>>> and they were both in the database (the recorded table) and their
>>> files where on disk.
>>>
>>> Then I discovered they I had only 5 of the 6...then 5...then 4.  They
>>> appeared to be taking several minutes to get deleted.  After they had
>>> been deleted, it appears that the backend was attempting to process my
>>> subsequent requests to delete them (I tried more than once) which
>>> generated errors, as they were already gone at that point:
>>>
>>> 2010-02-21 22:17:05.967 ERROR retrieving program info when trying to
>>> delete program for chanid 1313 recorded at Sun Feb 21 04:00:00 2010.
>>> Recording will NOT be deleted.
>>> 2010-02-21 22:17:05.971 ERROR retrieving program info when trying to
>>> delete program for chanid 1313 recorded at Sun Feb 21 04:00:00 2010.
>>> Recording will NOT be deleted.
>>> ...etc...
>>>
>>> These were small SD recordings.  Unless I didn't notice it, this
>>> doesn't seem to have happened for me with other recordings.
>>> Everything else I record is HD (or at least HD resolution/size).
>>>
>>> I have slow deletes on as I use ext3, but I always have, and I never
>>> noticed that behavior in 0.21.
>>>
>>> Did something change in how this works?
>>>
>>
>> Wow...I just deleted a bunch of shows (older episodes of The Dr. Oz
>> Show) and the same thing is happening.  They disappear from the
>> recorded programs when you delete them (in either the frontend or
>> mythweb) but upon exiting and reentering the list they still show
>> until the slow delete is actually finished.  I'm thinking about
>> converting by recordings drive to ext4 and bagging the slow deletes
>> once and for all, but I'd really like to know if this is how it works
>> now.
>>
>> Am I the only one seeing this happen?
>>
>
> Others have reported the issue /without/ the slow deletes option enabled.  I
> can almost guarantee that the issue has nothing to do with slow
> deletes--it's breakage elsewhere.  Granted, the faster the file system
> deletes the file(s), the less likely you are to encounter the race
> condition.  Regardless, we do plan to fix the issue (which is in the Watch
> Recordings code and, likely, specifically in the code which passes
> information about the recordings in the screen).
>
> Mike

Yup...I just discovered that.  As a test I tried it with slow deletes
turned off.  With my ext3 the deletes take long enough that I was able
to see this behavior even with that off, though for a much shorter
amount of time obviously.  Apparently shows with the deletepending set
on recorded are showing in both the frontend and mythweb.

I think I'm going to move to ext4 on my recording partition soon.

By the way...another thing that appears to have changed since 0.21:
It used to be the case that, if a number of files where pending slow
deletes when the backend is stopped, it deleted them as fast as the
file system allowed before actually stopping.  It doesn't appear that
occurs any more.  As a matter of fact, when I tried it, not only did
it not delete the files...it appeared they weren't even getting
truncated/deleted at all when I restarted the backend (even though
they were set as deletepending in the recorded table) until I actually
deleted them again.

Actually though, I always wondered about that behavior and how it
would act in the event of an actual shutdown.  When I've done this
under gentoo by stopping the backend via the init script, the stop
would report failure and I'd wait for all the deletes to finish and
for the process to stop.  I always wondered about what would happen if
that were an actual shutdown...and didn't want to find out :D.

Thanks
Tom


More information about the mythtv-users mailing list