mwheelerjr / mptvseries

Automatically exported from code.google.com/p/mptvseries
0 stars 0 forks source link

Database rebuilds if server crashes/reboots #450

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have a proper Dbase build (have some watched flags set)
2. Reboot your server that has the files in question
3. Watch TV Series rebuild the database from scratch and lose all of your 
settings

What is the expected output? What do you see instead?

I expect it to react the same a previous versions of MP TV series, once the 
files are found I believe it just double checked them on the existing Dbase.

Instead it wipes everything out and rebuilds it from scratch.

What version of MP-TVSeries and MediaPortal are you using?

MPTVSeries  2.6.0 (bundled with StreamedMP)
Mediaportal 1.1.0 final

What Skin are you using?

StreamedMP

On what operating system?

Win XP Sp2

Please provide any additional information below e.g. Logs & Pictures.

Original issue reported on code.google.com by Fli...@gmail.com on 2 Aug 2010 at 1:02

GoogleCodeExporter commented 9 years ago
Others experiencing same problem:

http://forum.team-mediaportal.com/my-tvseries-162/mediaportal-tv-series-complete
ly-rebuilds-database-if-my-server-crashes-85111/

Original comment by Fli...@gmail.com on 2 Aug 2010 at 1:03

GoogleCodeExporter commented 9 years ago
I believe i have a similar issue since the latest version came out

my HTPC is always on, however my main storage server shutdown at night 
automagically

I havent seen it rebuild the database personally, but it does indeed seem to 
loose the watched list every day

MP 1.10 Final, Latest MPTVSeries, StreamedMP latest, and Windows 7 64bit

cheers

Original comment by moisty...@gmail.com on 7 Aug 2010 at 8:42

GoogleCodeExporter commented 9 years ago
hey moistyman, chances are then ur database is being rebuilt. do u mind 
attaching logs? my server is being rebuilt and i can;t replicate the problem 
for them at the moment.

Original comment by Fli...@gmail.com on 9 Aug 2010 at 12:23

GoogleCodeExporter commented 9 years ago
Issue 451 has been merged into this issue.

Original comment by damien.haynes@gmail.com on 14 Aug 2010 at 11:04

GoogleCodeExporter commented 9 years ago
i dont think the database is been completely scratched and rebuilt, as i have 2 
UNC paths for different servers, and the content is not lost for the server 
thats on 24 hours, it remains

It does appear to rebuild that content from a offline server from scratch when 
its back online, 

Original comment by moisty...@gmail.com on 16 Aug 2010 at 6:24

GoogleCodeExporter commented 9 years ago
I also have this issue, I only noticed it because my watched flags were all 
reset on a reboot of my PC, not sure if my DB is being rebuilt though. My files 
are all on a NAS with a UNC mapping.

I will try and find some logs but have not done that before so it may take some 
time :)

Original comment by lp.richa...@gmail.com on 24 Aug 2010 at 10:44

GoogleCodeExporter commented 9 years ago
I'm running MP 1.1.0 Final + MP-TV 2.6.0 on my HTPC, which I put into standby 
when its not in use. All the media is imported from mapped network drives and I 
often find that after waking it one or more of those drives have been "lost" 
and MP-TV wants to re-scan their mediainfo (which takes quite some time for 
~500Gb of media).

Perhaps an option for some kind of metadata files that can be stored on the 
network attached media so that MP-TV knows that they're "existing" files and 
doesn't need to re-scan them?

Original comment by spa...@gmail.com on 24 Aug 2010 at 4:07

GoogleCodeExporter commented 9 years ago
I have looked at my logs, it is constantly deleting all of my series from the 
database and then re-adding them back in, thus removing all the watch flags. 
This definitely did not happen in previous versions and I have always had my 
series on my NAS, which is never turned off, just the clients are put to sleep 
or rebooted.

Original comment by lp.richa...@gmail.com on 25 Aug 2010 at 9:25

Attachments:

GoogleCodeExporter commented 9 years ago
Had a mp client crash, psu died, after fixing and switching it back on 
mytvseries database was been rebuilt from scratch, 

Wasn't in the plugin at the time it crashed, all other databases such as moving 
pictures were fine

Original comment by connect...@gmail.com on 1 Sep 2010 at 5:05

GoogleCodeExporter commented 9 years ago

Original comment by damien.haynes@gmail.com on 2 Sep 2010 at 5:50

GoogleCodeExporter commented 9 years ago
Just to add that following a user's (on MP forum) suggestion to use "keep 
references" check box next to my UNC share in the TV-Series plugin 
configuration, the issue seems to have gone away.

Watch flags are surviving multiple reboots and sleeps. I have not yet had a 
chance to look at logs to see if the constant delete/add cycle has stopped.

I don't remember this "keep references" check box being there before, just the 
"removable" one. When did this get added?

Original comment by lp.richa...@gmail.com on 2 Sep 2010 at 4:19

GoogleCodeExporter commented 9 years ago
it would be much better if it worked the same way as previous versions of 
mytvseries did, not trying to use keep references as a work around.

Original comment by connect...@gmail.com on 2 Sep 2010 at 8:27

GoogleCodeExporter commented 9 years ago
Keep_References was added sometime in the previous version, its not a global 
variable anymore but attached to a particular import path instead. 
Keep_References keep all data in database even if the local media is not 
available.

Its possible you had it enabled previously, its used for your particular case 
where a network share goes offline on occasion while mediaportal is running.

Removable property is used for USB/DVD drives, ie something removable. This 
will extract mediainfo for the Disk so it can be prompted in GUI if media is 
not available ie, disk no inserted or USB drive not plugged in.

connectsys, I cant see any differences to how it worked previously. only the 
properties have changed and its most likely you had it enabled previously but 
after upgrade it was reset as its handled differently.

Anyway, im starting to look at this issue to help avoid using 
'keep_references'. First step I have done is add a configurable delay to when 
Import Starts after startup and resume from standby.

Next step is to enhance the File Monitor so it only deletes files/db records 
when root drive of the file is available/online.

Original comment by damien.haynes@gmail.com on 2 Sep 2010 at 10:25

GoogleCodeExporter commented 9 years ago
Thanks for the clarification, appreciate your work on this.

Original comment by lp.richa...@gmail.com on 3 Sep 2010 at 11:12

GoogleCodeExporter commented 9 years ago
Fixed in r1182.

Since there was some changes to functionality, it would be good if you guys can 
all give the attached version a good test.

'keep_references' and 'removable' have been removed. That stuff is now handled 
internally.

Original comment by damien.haynes@gmail.com on 4 Sep 2010 at 3:28

Attachments:

GoogleCodeExporter commented 9 years ago
I made a quick test with the new version:
- Sent whs to standby
- Sent client to standby
- Woke client
- WHS was woken up by client automatically
- All watched flags were still there

So, for me looks like everything is working again.

Original comment by michael....@gmail.com on 4 Sep 2010 at 7:35

GoogleCodeExporter commented 9 years ago
So far so good... Working fine for me after a bit of testing.

Original comment by Anthony....@gmail.com on 4 Sep 2010 at 7:40

GoogleCodeExporter commented 9 years ago
Attached another build for testing. 

Original comment by damien.haynes@gmail.com on 5 Sep 2010 at 11:13

Attachments:

GoogleCodeExporter commented 9 years ago
Hi damien,

made a first quick test with the new one:

- Sent client to standby
- Disconnected lan
- Woke client 
> DB seems ok

Original comment by michael....@gmail.com on 6 Sep 2010 at 6:30

GoogleCodeExporter commented 9 years ago
I just tested it. it works fine now.

When the server is down i get the normal "orange" txt that I used to see. When 
the server is back up, all works fine and the watched flags are still there.

Original comment by Fli...@gmail.com on 6 Sep 2010 at 3:03

GoogleCodeExporter commented 9 years ago
Okay this is good news, will issue a public release sometime this week if I 
have time otherwise next week. Continue to test and report back if you discover 
something.

Thanks

Original comment by damien.haynes@gmail.com on 6 Sep 2010 at 10:57

GoogleCodeExporter commented 9 years ago
I gave it a go as well

It now works really well, great stuff, thanks for looking into it

How often does it check if the share is offline/online, is it based on the 
setting 
"Scan remote shares every X minutes" or something else?

Original comment by connect...@gmail.com on 7 Sep 2010 at 3:28

GoogleCodeExporter commented 9 years ago
If you are using a mapped drive, it will know instantly if a drive is offline 
or online.

If you use a UNC share, it will pick it up when ever a local scan is done or 
the monitor for remote share every x minutes.

Original comment by damien.haynes@gmail.com on 7 Sep 2010 at 3:31

GoogleCodeExporter commented 9 years ago
I have tested too, works great! Thanks for fixing this issue!

Original comment by lp.richa...@gmail.com on 7 Sep 2010 at 9:41

GoogleCodeExporter commented 9 years ago
Hi Damien,

I am not sure if the function is at 100%. Since your fix new episodes are not 
found reliably. I have "Scan every 10 Minutes" and "Scan while fullscreen 
video" on. Over the last view days I had to trigger "Force local scan" manually 
although the network share was available all the time.

Original comment by michael....@gmail.com on 10 Sep 2010 at 6:21

GoogleCodeExporter commented 9 years ago
I would need to see logs at the point you see it not add the new episodes and 
where you expected them to. Please note there has been problems with theTVDB 
last few days so it could be down to that as well.

Original comment by damien.haynes@gmail.com on 10 Sep 2010 at 6:25

GoogleCodeExporter commented 9 years ago
Michael, that is more likely a prob with thetvdb.com' as they seem to be having 
lots of issues this week I reverted to previous plugin version to check and 
same prob

Original comment by connect...@gmail.com on 10 Sep 2010 at 6:26

GoogleCodeExporter commented 9 years ago
Allright. Will have a look over next few days and come back to you with logs if 
it persists. 

Original comment by michael....@gmail.com on 10 Sep 2010 at 6:44