Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#10704 closed Patch - Bug Fix (fixed)

Expired programs are not being deleted with master/slave backends.

Reported by: Ian Dall <ian@…> Owned by: stuartm
Priority: minor Milestone: 0.26.1
Component: MythTV - Housekeeper Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

When there are separate master and slave backends, recordings made on the slave are not deleted properly. They are moved to the "Deleted" recording group, but the files are not deleted and the database entries are not removed from the 'recorded' table.

Since this does not free up space, eventually all expirable programs end up in the "Deleted" group.

If the master backend is restarted the files are deleted and the database entries removed.

This appears to be introduced with commit f78f9992d754390fa42f109e5139b8eaf224d076

This appears to be because AutoExpire::SendDeleteMessages() records programs which have been moved to the "Deleted" group in deleted_set. Autoexpire::UpdateDontExpireSet() initialises dont_expire_set from deleted_set and AutoExpire::FillDBOrdered() skips programs in dont_expire_set when constructing expireList.

I can see what is wrong but it is harder to understand what is supposed to be happening and figure out the fix. This is not helped by some some variable and function names. dont_expire_set seems to be used to mean "don't delete" rather than "don't expire".

I THINK removing all references to deleted_set and initialising dont expire_set to the empty set would solve the problem.

This issue would be masked by what looks like another bug when there are no slave backends. If the recording hostname is the same as the master hostname, autoexpired programs are just deleted without first sticking them in the "Deleted' recording group.

Attachments (1)

deleted_set.patch (1.3 KB ) - added by Ian Dall <ian@…> 14 years ago.
Patch to remove references to deleted_set and initialise dont_expire_set properly.

Download all attachments as: .zip

Change History (12)

by Ian Dall <ian@…>, 14 years ago

Attachment: deleted_set.patch added

Patch to remove references to deleted_set and initialise dont_expire_set properly.

comment:1 by beirdo, 14 years ago

Milestone: 0.26unknown

Removing improperly set milestone.

comment:2 by Jason <jason-devel-mythtv@…>, 14 years ago

This bug has been biting me as well. Is there any tracing, testing, etc. that I can do to help move this along?

comment:3 by Ian Dall <ian@…>, 14 years ago

For information, I have been running with this patch since I submitted it (over six months ago) with no problems.

comment:4 by davescammell@…, 14 years ago

biting me too, will try this patch and report.

comment:5 by stuartm, 14 years ago

Type: Bug Report - GeneralPatch - Bug Fix

If including patches with your tickets can you please set the ticket Type correctly? We can usually close tickets with patches faster but they will usually go overlooked unless they have been properly categorised.

comment:6 by stuartm, 14 years ago

Component: MythTV - GeneralMythTV - Housekeeper
Milestone: unknown0.26.1
Owner: set to sphery
Status: newassigned

comment:7 by davescammell@…, 14 years ago

Works for me. The patch only required about one line to be amended against MythTV Version : v0.26.0-36-g8c68560-dirty (26 fixes) and has only been done against the MBE but the SBE is now happily reporting:

mythbackend[29383]: I DeleteThread mainserver.cpp:95 (delete_file_immediately) About to delete file: /m/video1/mythtv/9700_20121128074200.mpg & similar for the associated png file.

and seems to be keeping the disk from filling up now. Sorry that took so long to report on, I've had build issues on the MBE.

+1 on the patch.Thanks.dave

comment:8 by stuartm, 14 years ago

Owner: changed from sphery to stuartm
Status: assignedaccepted

comment:9 by Ian Dall <ian@…>, 14 years ago

Resolution: fixed
Status: acceptedclosed

In e150a19030a81e3c099eff76b280b886122529b1/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:10 by Ian Dall <ian@…>, 14 years ago

In 8a7892b1ca1ec307d32a78153b57e012a721e9d3/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:11 by Ian Dall <ian@…>, 14 years ago

In e38e08fcfa8e23136f0effdd54cc91eb434efd67/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available
Note: See TracTickets for help on using tickets.