﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	mlocked
12974	Auto expire has race condition	amb@…	sphery	"The auto expiration of deleted programs has a race condition.

Recorded programs to be deleted are marked for deletion by setting deletepending=1 in the database and they are also added to a list to be deleted.  The deletepending flag in the database stops this recording from appearing in the recording list or in the list of recordings to delete.

The race condition occurs if mythbackend is killed or dies after the recording is flagged for deletion but before it is deleted.  The flag in the database stops the same recording from being added to the list again.  The file therefore remains on the disk and the entry remains in the database but it is invisible in the frontend recording list and will not be re-added to the list for deletion.

The patch attached is one solution, it may not be optimum.  It ignores the deletepending flag if it was set more than 5 minutes ago.  This stops the recording becoming invisible so it can be added to the list again and really get deleted.
"	Bug Report - General	closed	minor	29.2	MythTV - General	0.28.0	medium	Trac EOL			0
