Answering myself partly ...
2013/3/18 Jeremie BOUSQUET <jeremie.bousquet(a)gmail.com>
Hello,
I'm trying migration of XWIki 3.5 to 4.5.2, and have some issues ...
First, I must tell that I ran the queries described in [1], to cleanup the
3 stats tables.
What happened though, is that during the migration I got an OutOfMemory
error ... during migration of xwikistatsdoc.
I relaunched with more heap (2Go), but got it again.
I relaunched after activating safemode for that particular migration (R40000XWIKI6990),
but then I got an issue on duplicate key for the xwikistatsdoc table:
Caused by: com.xpn.xwiki.XWikiException: Error number 3005 in 3:
R40000XWIKI6990 migration failed while converting ID from [232911443] to
[7825842251281349221]
A quick analysis of incriminated rows shows (sorry for display):
+----------------------+------------+----------------------------+---------------+
| XWS_ID | XWS_NUMBER | XWS_NAME |
XWS_CLASSNAME |
+----------------------+------------+----------------------------+---------------+
| 232911443 | 1956069455 | Main |
|
| 5956685394971351254 | 1956069455 | |
|
| 7825842251281349221 | 1956069455 | Main |
|
+----------------------+------------+----------------------------+---------------+
To me it seems that as migration process was interrupted, maybe stat with
id 232911443 was migrated successfully (in a previous run) to id 7825842251281349221,
but old row was not removed.
So when migration occurs again, it tries to migrate that same line again
and fails.
So I will try to run again after removing that line,
... that fails again, on another row. I believe that means that my table is
now corrupted and won't migrate, unless I remove the "potential" duplicates
beforehand ...
I wonder if it could be somewhat possible to write such a script, ie that
would remove already migrated rows, or rows that once migrated will
generate duplicates ?
If not I would go back to my backup ...
but in case it fails, is it possible to only:
- put back my backup of the 3 stats tables only (as the rest was
successfully migrated)
- relaunch the migration
Would I need to update something in the migration temp tables to achieve
that ? (ie restart migration only for stats tables), or will it do it by
itself as it knows that step was unsuccessful ?
Asking that because migration is painfully long, so I prefer to prepare
myself to loose less time ... tomorrow ;-)
Bonus question: There are plenty of rows in xwikistatsdoc with empty value
in "XWS_NAME" field. Are these normal ? Can I / Should I purge them ?
Br,
Jeremie
[1]
http://jira.xwiki.org/browse/XWIKI-8129