Ticket #7 (closed enhancement: invalid)

Opened 6 years ago

Last modified 6 years ago

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

Reported by: dom Owned by: dom
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

Changed 6 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!

Changed 6 years ago by dom

  • priority changed from major to normal
  • summary changed from Only report missing node for metadata/content once per node - or go ahead and create it to MySQL - 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]

Changed 6 years ago by dom

  • status changed from new to closed
  • resolution set to invalid

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

Note: See TracTickets for help on using tickets.