Opened 14 years ago

Closed 14 years ago

#7 closed enhancement (invalid)

MySQL - Only report missing node for metadata/content once per node - or go ahead and create it

Reported by: Dominic Hargreaves Owned by: Dominic Hargreaves
Priority: normal Milestone:
Component: wiki-toolkit Version: svn
Keywords: Cc:

Description

The upgrade procedure to the new db schema currently prints lots of identical lines eg:

There was no node entry for metadata with name (node) 'Jericho Cafe', unable to 
migrate it! at /usr/share/perl5/Wiki/Toolkit/Setup/Database.pm line 83.
There was no node entry for metadata with name (node) 'Jericho Cafe', unable to 
migrate it! at /usr/share/perl5/Wiki/Toolkit/Setup/Database.pm line 83.
There was no node entry for metadata with name (node) 'Jericho Cafe', unable to 
migrate it! at /usr/share/perl5/Wiki/Toolkit/Setup/Database.pm line 83.
There was no node entry for metadata with name (node) 'Jericho Cafe', unable to 
migrate it! at /usr/share/perl5/Wiki/Toolkit/Setup/Database.pm line 83.

We should ideally create the node anyway and do the best we can. We should then just print one warning per node (saying that we've created the node) and the further insertions should work.

Also, we should do this using print STDERR, not warn, as warn makes things difficult to read and is not really appropriate for this use.

Change History (3)

comment:1 Changed 14 years ago by nick

Did you ever manage to figure out why you were ending up with content+metadata entries, but no node ones?

Currently, these lost "nodes" aren't showing up (in almost all cases), so if we do create a node entry for them, they'll suddenly appear. This doesn't seem like the correct behavour to me.

warn vs print should be an easy fix. It is a warning though!

comment:2 Changed 14 years ago by Dominic Hargreaves

Priority: majornormal
Summary: Only report missing node for metadata/content once per node - or go ahead and create itMySQL - Only report missing node for metadata/content once per node - or go ahead and create it

It'll be due to manual database munging. A similar problem exists in postgres - see [10]

comment:3 Changed 14 years ago by Dominic Hargreaves

Resolution: invalid
Status: newclosed

Okay, decided that this isn't a problem really.

Note: See TracTickets for help on using tickets.