[IRCServices Coding] XML import problem

Andrew Church achurch at achurch.org
Wed Aug 28 15:49:40 PDT 2002


>After doing an XML dump and importing the file on another box with -import
>it turned out some nicks vanished during import. So i compared the XML dump
>with the nick.db generated from it.
>It turns out that nickgroups whit an <id> field bigger than 9 numbers get
>discarded by the XML import.

     I can see a potential cause of this; can you send me your XML dump to
check with? (privately, of course)

>I don't get why some nickgroups have such huge id's anyway :-\

     Nickgroup IDs are (1) derived from the nickname using a hash function,
and (2) assigned randomly if a collision occurs.  They're not assigned
sequentially to save the cost of going through the entire database (or a
good part of it) to find the first or next free ID.  This does raise the
possibility of being unable to obtain an ID when there are still some
available, but as described in modules/nickserv/ns-local.h, this
possibility is at most 1 in 10^3600 using the default setting of 1000
retries, so I don't expect any problems in actual use.

  --Andrew Church
    achurch at achurch.org
    http://achurch.org/