Jump to content


Photo

I broke the wiki! :O


  • Please log in to reply
21 replies to this topic

#1 Schot

Schot

    DarkMatter's Imagineer

  • Administrator
  • 8,572 posts
  • Location:Montreal, Canada
  • Real Name:B-rad!
  • Platform:PC

Posted 10 October 2013 - 06:46 PM

Ok, well it's not THAT bad but it's certainly unpleasant at the moment.  I ran a search/replace on the wiki as a whole which has gone teeeerribly wrong!  Long story short is that I've got 3 or 4 search/replace requests running at the same time for pretty much the same thing.  Which means those requests writing over eachother as we speak.  It's thousands of edits and whats worse is that it's a slow process.  I can see new edits popping up everytime I press recent changes.  Argh!  I'm probably going to have to upload a backup of the wiki.  I made one just before starting the request.  Lesson learned!

 

I'll update as soon as I've finished mopping the floor.  *looks at horizon*  That's a lota floor!

 

P.s.

3000 edits and counting down!



#2 Knuckles

Knuckles

    Grand Poobah

  • Site Moderator
  • 6,241 posts
  • Location:Cape Cod Mass. USA
  • Real Name:Robb
  • Platform:PC
  • Steam Name:Knuckles (Robb)

Posted 10 October 2013 - 08:15 PM

If you wanted the record for most edits in one day...you could have just edited that page  :P



#3 Schot

Schot

    DarkMatter's Imagineer

  • Administrator
  • 8,572 posts
  • Location:Montreal, Canada
  • Real Name:B-rad!
  • Platform:PC

Posted 10 October 2013 - 09:33 PM

lol  Nooooow you tell me.  Dangit!



#4 gogoblender

gogoblender

    Dark Sun Guardian

  • Administrator
  • 32,057 posts
  • Location:Montreal,Quebec, Canada
  • Real Name:Rommel
  • Platform:PC

Posted 10 October 2013 - 09:38 PM

three thousand... !

no wonder all the lights are browning out

eeee... Damage Types... is this my fault too?

 

 

:lol:

 

gogo



#5 Schot

Schot

    DarkMatter's Imagineer

  • Administrator
  • 8,572 posts
  • Location:Montreal, Canada
  • Real Name:B-rad!
  • Platform:PC

Posted 10 October 2013 - 10:52 PM

Ugh!  I had a bad feeling about this.  Restoring a database is haaaard.  So many choices.  Do I cut the red wire or the green and omg, where did this purple polka-dot wire come from?!  :oooo:

 

EDIT:

Restore process complete but I feel uncertain about the whole thing.  The wiki should be up to date from the point just before I ran my search/replace.  It's just that when I uploaded the backup I made it looked quite a bit smaller in filesize and number of database tables compared to what the original database had.  Keep an eye out for missing bits!



#6 Knuckles

Knuckles

    Grand Poobah

  • Site Moderator
  • 6,241 posts
  • Location:Cape Cod Mass. USA
  • Real Name:Robb
  • Platform:PC
  • Steam Name:Knuckles (Robb)

Posted 11 October 2013 - 05:04 AM

The last few pages I worked on are all there :)



#7 gogoblender

gogoblender

    Dark Sun Guardian

  • Administrator
  • 32,057 posts
  • Location:Montreal,Quebec, Canada
  • Real Name:Rommel
  • Platform:PC

Posted 11 October 2013 - 06:46 AM

I Bwoke da wikeeeeeeeeeee...

Least I did not shoot dah depewteeeeeeeeee...

 

:dance:

 

gogo



#8 Ysne58

Ysne58

    Mister Einsteinium

  • Sacred Wiki Member
  • 1,938 posts
  • Real Name:Cathleen Anderson

Posted 11 October 2013 - 12:00 PM

Egads!



#9 Flix

Flix

    Modimus Prime

  • FDM Moderator
  • 3,091 posts
  • Platform:PC

Posted 11 October 2013 - 12:22 PM


  Diablo 2 Fallen Mod         Sacred 2 Enhanced Spells Mod          Flix's Music Mod for Sacred 2
   Elite Mounts Mod              Sacred 2 Character Editor           List of Mods and Modding Guides

    Sacred 2 Nexus                    Sacred 2 Nude Mod                     Community Items Mod


#10 gogoblender

gogoblender

    Dark Sun Guardian

  • Administrator
  • 32,057 posts
  • Location:Montreal,Quebec, Canada
  • Real Name:Rommel
  • Platform:PC

Posted 11 October 2013 - 01:38 PM

ah ahhahahh

as you'd have it, Futurama is one of (groan) Schot's big things on video

:lol:

 

gogo



#11 Schot

Schot

    DarkMatter's Imagineer

  • Administrator
  • 8,572 posts
  • Location:Montreal, Canada
  • Real Name:B-rad!
  • Platform:PC

Posted 11 October 2013 - 11:53 PM

lol Flix.  What was that again?  I'm sorry I missed the first word.  :3lmao:   Futurama FTW!  I do believe the wiki is perfectly fine now.  Well at least I finally got to restore a database.  I can check that off my list of things I need to know.  Heh. 

 

As for how this whole mess got started...  Funny story!  *skeptical murmuring from the crowd*  So I ran a search/replace request to replace Damage Types: with [[Sacred 2:Damage Types|Damage Types:]] that would effect hundreds of pages.  Seeing that not many edits had been done by my search/replace request in the recent changes page, I ran an identical query to see if my request had missed any instances of "Damage Types:".  My second request did in fact find that my first had missed some instances sooooo...  I ran it again of course!  Once again I ran the same query and again it had missed some so I ran a 3rd request!  Weeeeeee, right?  By now I'm seeing edits in pages that look like:

[[Sacred 2:Damage Types|[[Sacred 2:Damage Types|[[Sacred 2:Damage Types|Damage Types:]]]]]]

Not!  what I wanted, haha.  So I run a new request to replace [[Sacred 2:Damage Types|[[Sacred 2:Damage Types|[[Sacred 2:Damage Types|Damage Types:]]]]]] with DDDDDDDDDDD thinking that the "|" symbol was corrupting my replace request because the creator of the search/replace tool wrote as much in his help page.  It wasn't the cause of the problem after all...

 

Maaaany hundreds of edits later...  I realized what was actually happening.   I clicked Recent Changes on the wiki and saw all the edits that had been done by the replace request and tagged as being done by me.  I clicked Recent Changes again and saw NEW edits done by me.  And again I clicked recent changes which again showed evener more and newer edits.  By me...  The replace request was still running.  At about one edit per second which, in the grand scheme of things, is veeery slow.   Each of the requests I ran probably had comprised about 800 edits or more.  At the rate the request was editing that would take about 13 minutes.  I ran several requests...  Each time I ran a request the wiki showed me pages that fit the criteria I made to search and replace Damage Types:.  But!  What it didn't show me is that those pages were already in queue to be replaced.  So without realizing soon enough I had begun 4 requests all trailing one after another at the same rate doing the same thing and thereby turning Damage Types: into [[Sacred 2:Damage Types|Damage Types:]] then into [[Sacred 2:Damage Types|[[Sacred 2:Damage Types|Damage Types:]]]] and then into [[Sacred 2:Damage Types|[[Sacred 2:Damage Types|[[Sacred 2:Damage Types|Damage Types:]]]]]]...

The way the search/replace tool is processed is definitely not what I would expect.  It runs far too slowly which is what threw me off.  Directly through the database the process would have taken maybe 10 seconds.  On the wiki and as an extension tool the author of the tool has designed it to operate very slowly so as not to bog down a wiki.  It's a nice thoughtful idea but we have a decent server for our wiki which can handle much more.  So I'll be tweaking the tool in the near future that's for sure!  Lesson learned.  :blush:



#12 wolfie2kX

wolfie2kX

    Cobalt Warrior

  • Sacred Wiki Member
  • 3,693 posts
  • Location:Los Angeles, CA
  • Real Name:Pete
  • Platform:PC

Posted 12 October 2013 - 12:10 AM

Eeeww.. That is an ugly thing.. You might try, next time, adding a space in front of or behind the end of the phrase you want to replace.

 

E.g.:

 

"Damage Types:" should read " Damage Types: " or "Damage Types: " Note - there is a space before and/or after the phrase.

 

Why:

 

SQL is a very literal language. Literal to the point of being almost anal retentive. This has it's plusses and minuses. By doing the extra space thing, you're covering both instances where there is a space before the first word and those where there isn't a space in front. This should eliminate the recursive nature of your SQL query that is repeating the fix on already fixed stuff.

 

The only time this may fail is if there isn't a space afterwards.

 

There's one other potential danger here. There's a wiki rule, IIRC that you only need to make the first instance of a linkable word or phrase into a link. By running the query willy nilly, you likely turned EVERY instance of "Damage Types" into a link. So if you have a page that talks extensively about Damage Types, like the Damage Types page, you're likely to have a TON of extra links per page.

 

Thinking this sort of thing might be better done manually.


This Space For Rent...

No... Seriously...


#13 Flix

Flix

    Modimus Prime

  • FDM Moderator
  • 3,091 posts
  • Platform:PC

Posted 13 October 2013 - 04:45 AM

lol Flix.  What was that again?  I'm sorry I missed the first word.  :3lmao:   Futurama FTW!  I do believe the wiki is perfectly fine now.  Well at least I finally got to restore a database.  I can check that off my list of things I need to know.  Heh. 

Phew.  Wasn't sure if it could be edited again.  There's still a big green error banner up on the Wiki.


  Diablo 2 Fallen Mod         Sacred 2 Enhanced Spells Mod          Flix's Music Mod for Sacred 2
   Elite Mounts Mod              Sacred 2 Character Editor           List of Mods and Modding Guides

    Sacred 2 Nexus                    Sacred 2 Nude Mod                     Community Items Mod


#14 gogoblender

gogoblender

    Dark Sun Guardian

  • Administrator
  • 32,057 posts
  • Location:Montreal,Quebec, Canada
  • Real Name:Rommel
  • Platform:PC

Posted 13 October 2013 - 08:39 AM

Back up and Working, Schot just needs some new eyeballz, he'll be fine

Git back ta Work Schot!

:whip:

 

gogo



#15 gogoblender

gogoblender

    Dark Sun Guardian

  • Administrator
  • 32,057 posts
  • Location:Montreal,Quebec, Canada
  • Real Name:Rommel
  • Platform:PC

Posted 13 October 2013 - 08:40 AM

Eeeww.. That is an ugly thing.. You might try, next time, adding a space in front of or behind the end of the phrase you want to replace.

 

E.g.:

 

"Damage Types:" should read " Damage Types: " or "Damage Types: " Note - there is a space before and/or after the phrase.

 

Why:

 

SQL is a very literal language. Literal to the point of being almost anal retentive. This has it's plusses and minuses. By doing the extra space thing, you're covering both instances where there is a space before the first word and those where there isn't a space in front. This should eliminate the recursive nature of your SQL query that is repeating the fix on already fixed stuff.

 

The only time this may fail is if there isn't a space afterwards.

 

There's one other potential danger here. There's a wiki rule, IIRC that you only need to make the first instance of a linkable word or phrase into a link. By running the query willy nilly, you likely turned EVERY instance of "Damage Types" into a link. So if you have a page that talks extensively about Damage Types, like the Damage Types page, you're likely to have a TON of extra links per page.

 

Thinking this sort of thing might be better done manually.

It's a pretty massive super power.  I think Schot's fingers will tremble if something else this big has to be run through the Wiki, which, as he stated, is starting to get HUGE

 

:)


Gogo



#16 Schot

Schot

    DarkMatter's Imagineer

  • Administrator
  • 8,572 posts
  • Location:Montreal, Canada
  • Real Name:B-rad!
  • Platform:PC

Posted 15 October 2013 - 11:20 AM

Eeeww.. That is an ugly thing.. You might try, next time, adding a space in front of or behind the end of the phrase you want to replace.
 
E.g.:
 
"Damage Types:" should read " Damage Types: " or "Damage Types: " Note - there is a space before and/or after the phrase.
 
Why:
 
SQL is a very literal language. Literal to the point of being almost anal retentive. This has it's plusses and minuses. By doing the extra space thing, you're covering both instances where there is a space before the first word and those where there isn't a space in front. This should eliminate the recursive nature of your SQL query that is repeating the fix on already fixed stuff.
 
The only time this may fail is if there isn't a space afterwards.
 
There's one other potential danger here. There's a wiki rule, IIRC that you only need to make the first instance of a linkable word or phrase into a link. By running the query willy nilly, you likely turned EVERY instance of "Damage Types" into a link. So if you have a page that talks extensively about Damage Types, like the Damage Types page, you're likely to have a TON of extra links per page.
 
Thinking this sort of thing might be better done manually.

Great tips wolfie, thanx! Unfortunately for my query, Damage Types:, there were no spaces before or after. Though there was a colon which I included in my query in addition to restricting the query to the Sacred 2 namespace and also restricting it to within the Sacred 2 Enemies in Ancaria category of pages. The problem wasn't so much of "running the query willy nilly" as you said it.  It was that the amount of time needed to complete the query was unexpected.  The simple solution is just to run it once and then allow it to complete which would probably take an hour or two without much impact in the performance of SacredWiki.  As for expanding the SQL query I'm a bit limited in the extent of expressions I can use.  The tool I'm using is very limited in that regard, meant for relatively simple find/replace tasks.  When all is said and done though, I don't think I'll run this query again but rather save it for more important tasks such as minimizing the redirects we have or finally getting rid of non-uploaded images that we have on the wiki.  To be continued!

 

lol Flix.  What was that again?  I'm sorry I missed the first word.  :3lmao:   Futurama FTW!  I do believe the wiki is perfectly fine now.  Well at least I finally got to restore a database.  I can check that off my list of things I need to know.  Heh.

Phew.  Wasn't sure if it could be edited again.  There's still a big green error banner up on the Wiki.

Sorry about that message Flix.  I had removed that message the day I posted that the wiki was ok but unfortunately individual browser caches sometimes hold onto stuff longer than they need to.  gogo had the same problem.  I'll try a few tricks to make sure messages appear and disappear more quickly when using that form of communication.  :)



#17 Flix

Flix

    Modimus Prime

  • FDM Moderator
  • 3,091 posts
  • Platform:PC

Posted 15 October 2013 - 11:39 AM

Didn't even consider that Schot!  It seems like Firefox usually shreds my cache and cookies almost immediately.  I was also only noticing it when I was NOT logged in.


  Diablo 2 Fallen Mod         Sacred 2 Enhanced Spells Mod          Flix's Music Mod for Sacred 2
   Elite Mounts Mod              Sacred 2 Character Editor           List of Mods and Modding Guides

    Sacred 2 Nexus                    Sacred 2 Nude Mod                     Community Items Mod


#18 gogoblender

gogoblender

    Dark Sun Guardian

  • Administrator
  • 32,057 posts
  • Location:Montreal,Quebec, Canada
  • Real Name:Rommel
  • Platform:PC

Posted 15 October 2013 - 11:47 AM

Wouldn't mind replacing that green thing with a poutine ad

Folks will keep coming back!

:lol:

 

gogo



#19 Schot

Schot

    DarkMatter's Imagineer

  • Administrator
  • 8,572 posts
  • Location:Montreal, Canada
  • Real Name:B-rad!
  • Platform:PC

Posted 15 October 2013 - 11:51 AM

Green Poutine?  ^^

 

Aaaaah.  Ok.  Then that's our new file caching system that I started up a week or so ago.  It creates static pre-rendered pages of the wiki to guests only.  The idea being to reduce the size of our database and to reduce the amount of bandwidth the wiki goes through from visitors viewing/downloading content.   I was wondering what sort of bumps in the road we might run into after starting the file cache system.  I guess you found the first bump.  :D  I'll see if I can purge that bit of cache from the system.



#20 Ysne58

Ysne58

    Mister Einsteinium

  • Sacred Wiki Member
  • 1,938 posts
  • Real Name:Cathleen Anderson

Posted 15 October 2013 - 12:54 PM

Well at least you didn't delete everything from a college server like my sister did once.  IT person forgot to change something, and she hit the delete button twice in a row at the worst possible time and did the maximum damage possible.  Of course, being almost completely computer illiterate, she had absolutely no idea what she was doing.  Mainframe was completely wiped and all that was left was an incomplete backup.   

That is an example of Murphy's Laws in action.

I'm feeling a bit burnt out at the moment.  Eventually that will pass.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users