I do recall seeing debugging messages printing to stderr when I ran
the script, but they didn't look serious at the time.
One issue I've found is that the default function compressWithConcat
assumes that the text table can do transactions as it is using
dbw->begin and dbw->commit statements. Our text table was initially
created with a version 1.3 of Mediawiki and is still a MyISAM table
(which doesn't support transactions), so if something goes wrong,
there's no opportunity to do a rollback.
I'd suggest at least warning the user of these consequences, or just
use the more basic compressOldPages if InnoDB isn't present:
$res = $dbr->query("show table status like 'text';");
if ($row = $dbr->fetchObject($res)) {
$engine = $row->Engine;
if ($engine != 'InnoDB') {
print "Warning the text table is not an InnoDB table,
transactions are not supported\n";
$dbr->freeResult( $res );
return;
}
}
$dbr->freeResult( $res );
I've been running compressOld against an original version of the
revisions that had problems, it seems to be working, so it might not
be a reproducible problem based on which revisions are compressed.
I'll look more into it.
Travis
On 1/31/07, Brion Vibber <brion(a)pobox.com> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Travis Derouin wrote:
Looking at the structure of things, it looks like
the first revision
gets stored as a ConcatenatedGzipHistoryBlob which has all of the
revisions compressed into one, and subsequent revisions are replaced
with Stubs that point to the initial ConcatenatedGzipHistoryBlob
revision.
The problem that I'm having is that there is no initial
ConcatenatedGzipHistoryBlob revision for these problematic histories,
all of the revisions are stubs, which looks like the data was lost for
these affected pages when I ran compressOld.php.
This is not good! We have backups, but it will be a pain to fix. Is
the best way to load the old back up into a separate db and then do
something like
UPDATE current_wiki.text
SET current_wiki.text.old_text = backup_wiki.text.old_text,
current_wiki.text.old_flags = backup_wiki.text_old_text
(assign other relevant fields here)
WHERE
current_wiki.text.old_id = backup_wiki.text_old_id
AND current_wiki.text.old_id in (BAD TEXT ENTRIES)
Should work, yeah...
I'm going to try to reproduce what happened
to see if I can narrow
down the problem.
Great... bugs in that code are not fun. :(
- -- brion vibber (brion @
pobox.com / brion @
wikimedia.org)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iD8DBQFFwSKUwRnhpk1wk44RAliGAJ4ue6MWVhRCosAAHVEnU6VRpakaHwCfUR7m
NQUhoUOV13nhqNUZA7Zh4yw=
=/YvX
-----END PGP SIGNATURE-----
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/wikitech-l