Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#681 closed defect (fixed)

Slave hosts do not expire live TV files

Reported by: bjm <bjm@…> Owned by: cpinkham
Priority: minor Milestone: unknown
Component: mythtv Version:
Severity: medium Keywords:
Cc: Ticket locked: no

Description

If I use "Y" in live TV the files created on the slave do not get expired but the ones on the master do. It doesn't matter where the frontend is or which card was accesses first.

For example, I'm running the frontend on a slave in a two single card backend test env. I go to 3 then 13 on the local card 2 then press "Y" to record 23 on card 1 on the master.

Slave:
2005-11-19 13:17:47.527 TVRec(2): RingBufferChanged()
2005-11-19 13:17:47.535 Finished recording Unknown: channel 1003
2005-11-19 13:17:59.258 TVRec(2): Changing from WatchingLiveTV to None
2005-11-19 13:17:59.628 Finished recording Unknown: channel 1013

(no further outout)

Master:
2005-11-19 13:18:51.899 Finished recording Unknown: channel 1023
2005-11-19 13:20:06.641 AutoExpiring: Unknown Sat Nov 19 13:17:59 2005 32 MBytes
2005-11-19 13:20:06.642 After unlink we will have 20776 MB free.
2005-11-19 13:20:06.650 Reschedule requested for id 0.
2005-11-19 13:20:06.695 Scheduled 1 items in 0.0 = 0.00 match + 0.04 place
2005-11-19 13:20:09.675 About to unlink/delete file: /video/mythtv/1023_20051119131759.nuv
2005-11-19 13:20:15.708 Reschedule requested for id 0.
2005-11-19 13:20:15.765 Scheduled 1 items in 0.0 = 0.00 match + 0.04 place


The master expired it's file after 1:15 but the files on the slave
are left behind.

mysql> select starttime,title,hostname from recorded;
+---------------------+---------+----------+
| starttime           | title   | hostname |
+---------------------+---------+----------+
| 2005-11-19 13:17:36 | Unknown | nordvid  |
| 2005-11-19 13:17:47 | Unknown | nordvid  |
+---------------------+---------+----------+
2 rows in set (0.00 sec)

Change History (6)

comment:1 Changed 18 years ago by anonymous

Owner: changed from cpinkham to anonymous
Status: newassigned

For those recordings, what are the values of the recgroup and autoexpire fields in the recorded table? Also what is in your inuseprograms table?

comment:2 Changed 18 years ago by cpinkham

Owner: changed from anonymous to cpinkham
Status: assignednew

comment:3 Changed 18 years ago by cpinkham

Also include the endtime from the recorded table as well please.

comment:4 Changed 18 years ago by bjm <bjm@…>

Here is a new example with more details.

During live from card 1 on the master:
mysql> select * from inuseprograms\G
*************************** 1. row ***************************
        chanid: 1023
     starttime: 2005-11-19 15:09:07
      recusage: player
lastupdatetime: 2005-11-19 15:09:08
      hostname: moktoo
*************************** 2. row ***************************
        chanid: 1023
     starttime: 2005-11-19 15:09:07
      recusage: recorder
lastupdatetime: 2005-11-19 15:09:07
      hostname: moktoo
2 rows in set (0.04 sec)

During live from card 2 on the slave:
mysql> select * from inuseprograms\G
*************************** 1. row ***************************
        chanid: 1013
     starttime: 2005-11-19 15:10:01
      recusage: recorder
lastupdatetime: 2005-11-19 15:10:01
      hostname: nordvid
*************************** 2. row ***************************
        chanid: 1013
     starttime: 2005-11-19 15:10:01
      recusage: player
lastupdatetime: 2005-11-19 15:10:02
      hostname: moktoo
2 rows in set (0.00 sec)

After exiting liveTV:
mysql> select * from inuseprograms\G
Empty set (0.00 sec)

Both recorded entries:
mysql> select * from recorded\G
*************************** 1. row ***************************
         chanid: 1023
      starttime: 2005-11-19 15:09:07
        endtime: 2005-11-19 15:10:00
          title: Unknown
       subtitle:
    description:
       category:
       hostname: moktoo
       bookmark: NULL
        editing: 0
        cutlist: NULL
     autoexpire: 10000
    commflagged: 0
       recgroup: LiveTV
       recordid: 0
       seriesid:
      programid:
   lastmodified: 2005-11-19 15:10:01
       filesize: 33847972
          stars: 0
previouslyshown: 0
originalairdate: 2005-11-19
       preserve: 0
         findid: 0
  deletepending: 0
     transcoder: 0
    timestretch: 1
    recpriority: 0
       basename: 1023_20051119150907.nuv
      progstart: 2005-11-19 15:09:07
        progend: 2005-11-19 15:30:00
      playgroup: Default
*************************** 2. row ***************************
         chanid: 1013
      starttime: 2005-11-19 15:10:01
        endtime: 2005-11-19 15:11:00
          title: Unknown
       subtitle:
    description:
       category:
       hostname: nordvid
       bookmark: NULL
        editing: 0
        cutlist: NULL
     autoexpire: 10000
    commflagged: 0
       recgroup: LiveTV
       recordid: 0
       seriesid:
      programid:
   lastmodified: 2005-11-19 15:11:03
       filesize: 136761901
          stars: 0
previouslyshown: 0
originalairdate: 2005-11-19
       preserve: 0
         findid: 0
  deletepending: 0
     transcoder: 0
    timestretch: 1
    recpriority: 0
       basename: 1013_20051119151001.nuv
      progstart: 2005-11-19 15:10:01
        progend: 2005-11-19 15:30:00
      playgroup: Default
2 rows in set (0.00 sec)


The master expires it's file only:
2005-11-19 15:10:00.770 TVRec(1): Changing from WatchingLiveTV to None
2005-11-19 15:10:01.205 Finished recording Unknown: channel 1023
2005-11-19 15:12:17.121 AutoExpiring: Unknown Sat Nov 19 15:09:07 2005 32 MBytes
2005-11-19 15:12:17.121 After unlink we will have 20776 MB free.

The slave's file remains indefinately:
mysql> select starttime,endtime,hostname,recgroup,autoexpire from recorded;
+---------------------+---------------------+----------+----------+------------+
| starttime           | endtime             | hostname | recgroup | autoexpire |
+---------------------+---------------------+----------+----------+------------+
| 2005-11-19 15:10:01 | 2005-11-19 15:11:00 | nordvid  | LiveTV   |      10000 |
+---------------------+---------------------+----------+----------+------------+
1 row in set (0.00 sec)

comment:5 Changed 18 years ago by cpinkham

Resolution: fixed
Status: newclosed

(In [7937]) Attempt to fix #681.

Each backend is now responsible for cleaning up their own short LiveTV programs. Previously this cleanup code was only running on the master, but since the AutoExpire? CheckFile?() function checks to see if a file is local, it meant that only files accessible to the master backend could be expired. Now each backend will look for their own short LiveTV recordings and expire them.

I believe this will close the bugreport, but want verification first since I don't currently have a slave backend to test with.

comment:6 Changed 18 years ago by bjm <bjm@…>

Verified fix.

Note: See TracTickets for help on using tickets.