NextPVR Forums

Full Version: Deleting recordings from PC clients
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
How does deleting recordings from networked PC clients work? Does it need to be able to resolve the file path? I ask because I recently noticed that my recording drive was quite full and it turns out that many of my recordings were not deleted from disk as expected when selecting delete in the NPVR interface on a client PC. It also seems that the response to the "Ok" in the delete message on the client PC is often delayed with no response for up to 10 seconds. This seems to be the case for only the first delete - the message closes quickly on subsequent deletes.
Quote:How does deleting recordings from networked PC clients work?
The client tells the server to delete the recording, and it's done from the server side.

Quote:Does it need to be able to resolve the file path? I
No.

I dont have a client/server setup here at the moment, so not easy for me to test, but can you reproduce it, then post the client's npvr.log and server's nrecord.log? It should have a few messages saying "DeleteRecording...." in the server log.
This is from the server log:

Code:
2011-08-31 20:43:57.045    [ERROR][21]    Unexpected exception in ClientConnectionHandler: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 size, SocketFlags socketFlags)
   at NShared.ClientConnectionHandler.WorkerThread()
2011-08-31 20:43:57.045    [DEBUG][21]    ClientConnectionHandler exiting...
2011-08-31 20:44:03.924    [DEBUG][6]    DeleteRecording(2814)
2011-08-31 20:44:03.924    [DEBUG][6]    DeleteRecording@1
2011-08-31 20:44:03.924    [DEBUG][6]    Cancelling wake up request for for 'RecordingOID2814'
2011-08-31 20:44:04.002    [DEBUG][6]     -removing: T:\Wipeout\Wipeout_20110830_20002100.ts
2011-08-31 20:44:04.002    [ERROR][6]    Unexpected error in DeleteRecording(): System.IO.IOException: The process cannot access the file 'T:\Wipeout\Wipeout_20110830_20002100.ts' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.Delete(String path)
   at NShared.RecordingService.DeleteFile(String filename)
   at NShared.RecordingService.DeleteRecording(ScheduledRecording scheduledRecording)
2011-08-31 20:44:04.002    [DEBUG][6]    DeleteRecording@exit

This is delete bit from the client log:

Code:
2011-08-31 20:43:06.455    [DEBUG][1]    Deleting recording (file:T:\Wipeout\Wipeout_20110830_20002100.ts)
2011-08-31 20:43:06.542    [DEBUG][1]    Removing popup
2011-08-31 20:43:06.542    [DEBUG][1]    ActivatePopup: null
2011-08-31 20:43:06.543    [DEBUG][1]    deactivating old popup: Popup
2011-08-31 20:43:06.543    [DEBUG][1]    Going to dispose popup at end of animation
2011-08-31 20:43:06.545    [DEBUG][1]    Requesting RELOAD_RECORDINGS
2011-08-31 20:43:06.545    [DEBUG][1]    Recordings.RELOAD_RECORDINGS
2011-08-31 20:43:06.545    [DEBUG][1]    Recordings.RELOAD_RECORDINGS@1


I played the recording some, stopped it, selected the recording, and selected delete from the popup so I'm not exactly sure why it would still be in use.
Ah, ok. So it looks like it's tried to delete the file but was unable to because it was still in use.

I'm guessing something in the streaming logic is incorrectly leaving the file open. For comparison's sake, can you see if it manages to delete a file you haven't just watched?
I had to go back into the logs from yesterday for an example because I just tried deleting a file right after playback to reproduce it when you asked for logs and it worked so it might be a timing thing - maybe related to how long you wait before you try to delete? Unfortunately, I don't have any more recordings to delete/test.
I think this patch will fix it.
Thanks - I'll give it a try.
Preliminary testing seems to indicate that the patch fixes the problem - thanks.

There still is occasionally a long delay (I counted 20 seconds) when trying to delete a recording from a client. It seems to be on just the very first attempt. Any idea about this one?
cncb Wrote:There still is occasionally a long delay (I counted 20 seconds) when trying to delete a recording from a client. It seems to be on just the very first attempt. Any idea about this one?

The drive that the recording is on was spun-down? Or, if a network drive, temporarily disconnected?
BrettB Wrote:The drive that the recording is on was spun-down? Or, if a network drive, temporarily disconnected?

No, it is right after I just watched the recording.
Pages: 1 2 3 4