spacer.png, 0 kB
  May 18, 2013, 13:23:46

 
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Feature req: Ask for confirmation on important things  (Read 1620 times)
thorwak

Posts: 202


View Profile
« on: April 13, 2010, 09:26:58 »

Ok, so I just lost 40 GB of headers.. And it wasn't even by doing a stupid/uninformed selection (I would have been OK with that). I had the admin->control page open, monitoring load. I reach for the mouse, not looking at it, and manage accidentally to click the left mouse button with my pinky finger (misjudging where the mouse were, slightly). It slides slightly at the same time and the unlikely result (1 in 1000? 100000?) is that "Purge all newsgroups" gets selected. 0.5 seconds later all data is gone. Or, should be, but because of some bug URDD exits and a few groups are left untoched, leaving me with 23 GB of the 65+ I had. (There was one active set generating that had been running for a few hours, and one header update, so my guess is that one of those caused URDD to bomb when it wanted to nuke all data...)

I can only be happy this didn't happen when I have 300 GB of headers (and of course I will backup the data eventually). Still, a fatal command like this should ask for confirmation! I know this story sounds to freaky to be true, but it actually just happened. It'll take med a couple of days to get back to where I were so it's not disaster, but not fun. There are a few more commands that really should ask for confirmation too, but this is THE worst, by far.

Oh well. I guess my misfortune will make the product better in the end Tongue


EDIT: ...And there went the rest. I updated the one big group that was saved because of the bug described above. After it was done after a minute or so, it generated sets, but only for newly downloaded headers  (195.000) (probably some counter was off, even though the groups list showed the correct numbers). Then "expire incomplete sets" kicked in. Poof, 53.000.000 gone.

Some days one should just stay in bed (or use LVM snapshots more often...). Jebus.

Oh well. Maybe it was for the best. On the flip side, I got to see that "optimize database" on 23GB take about 7 mins - this took hours before so at least the setup is fairly good now.

I'll move on to 1.0.4 instead and start over. I guess the DB format won't change from current SVN to 1.0.4, so this should be "safe", right?

« Last Edit: April 13, 2010, 09:46:08 by thorwak » Logged
spearhead
Administrator
*
Posts: 1038


View Profile WWW
« Reply #1 on: April 13, 2010, 11:33:41 »

I could put a confirmation in purge. It  wouldn't be hard at all.

What bug dig you get? Any info in the log file?

I don't know if you need to update the database off the top of my head - it also depends on exactly what revision you have. Basically you can run the commands in update_db_1.0.3_to_1.0.4_mysql.sql (or sth like that). You don't have to reinstall the database or anything. If you are at 1.0.3 you can run update.sh optionally with the installed version as parameter. Both files are found in install/
Logged
thorwak

Posts: 202


View Profile
« Reply #2 on: April 13, 2010, 11:58:41 »

I'm not sure exactly what happened at the last stage, but somehow urdd lost track of how many post there were in the group. I thought they were lost even on disk, but when the dust settled I realized the parts-file still was well over 20G, even though about 100k articles was reported in the group list. I probably could have fixed this but since I lost most stuff anyway, and I actually found a backup (from the DB moving, yay) with 35 GB (and in a valid state!) I nuked the old DB and setup LVM properly so I can do snapshot whenever I do "dangerous" stuff (well it wouldn't have protected me this time...)

I then restored the old 1.0.3 DB, and upgraded to 1.0.4 and copied the config files, went perfect. So I'm back on track, and the Swedish translation will be done for 1.0.4 instead.

What I wondered was wether you may do any changes to the DB format between the current 1.0.4 SVN and the final 1.0.4 release, but since I understand 1.0.4 is fairly close I guess you won't?

Confirmation on global purge, and individial group purge (since it's so close to the expire button) I would strongly suggest as a useful feature Smiley
Logged
spearhead
Administrator
*
Posts: 1038


View Profile WWW
« Reply #3 on: April 13, 2010, 18:47:02 »

done
Logged
thorwak

Posts: 202


View Profile
« Reply #4 on: April 13, 2010, 19:03:27 »

Cool - except it's not working? (rev 1350) Tongue Nothing happens at all anymore when I try to purge a group? (I don't even dare to try the global purge right now...) Do I need to do anything except overwrite all the files with the new versions? I shouldn't have to restart urdd, right?

Running in Chrome, if that matters..
Logged
spearhead
Administrator
*
Posts: 1038


View Profile WWW
« Reply #5 on: April 13, 2010, 19:31:54 »

Have you reloaded the javascript (F5 usually)
Logged
thorwak

Posts: 202


View Profile
« Reply #6 on: April 13, 2010, 19:44:01 »

Yeah have tried most I can think of, F5, ctrl-F5, logging out and back in again. Haven't restarted urdd though because I have a set gen running since 6 hours ago that I hope will eventually finish Wink

EDIT: Here's what IE has to say about it:
Code:
Message: Unterminated string constant
Line: 670
Char: 116
Code: 0
URI: http://xxx.xxx.xxx.xxx/urd/html/newsgroups.php

Edit2: Here's Line 670:
Code:
<img src="../html/smarty/templates/default/img/icon_purge.png" alt="Purge" class="noborder" onmouseover="return overlib('T&ouml;m fullst&auml;ndigt');" onmouseout="nd();" onclick="javascript:ng_action_confirm('purgegroup', 3770, 'T&ouml;m fullst&auml;ndigt startad', 'T&ouml;m fullst&auml;ndigt misslyckad', 'T&ouml;m fullst&auml;ndigt "@@"?');" /><!--/a-->
</td>

EDIT3: Shorted the "code dump" a bit since problem is fixed now anyway.
« Last Edit: April 14, 2010, 05:59:52 by thorwak » Logged
spearhead
Administrator
*
Posts: 1038


View Profile WWW
« Reply #7 on: April 13, 2010, 22:27:28 »

It's fixed now.... silly quotes... thanx
Logged
thorwak

Posts: 202


View Profile
« Reply #8 on: April 14, 2010, 05:56:05 »

It's fixed now.... silly quotes... thanx

Confirmed working. I understood what the problem was (of course), but somehow I was too tired to actually see exactly which quotation mark was the problem so I posted the actual output for your eyes instead Cheesy

Thanks for implementing it so quickly, I appreciate it!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Amigri by Fakdordes
spacer.png, 0 kB
spacer.png, 0 kB
spacer.png, 0 kB