Re: Duplicate Names Bug??

From: Daniel Koepke (dkoepke@CALIFORNIA.COM)
Date: 03/12/98


On Thu, 12 Mar 1998, Ron Hensley wrote:

->OBCircle:
-> My muds been up for a good 2 - 2 1/2 years and ive noticed that the ID
->numbers are getting expleremely high, even though we dont have but 100 or
->so players in the database. In checking the code, I see that a new player
->always gets assisgned an ID 1 greater then the highest player, even
->though there are plenty of free numbers before it, created by deleted
->players. Anyone done any code to search 0 to TOP_ID for a spare and use
->it instead? I tried once a few months ago and managed to create a nie
->mess :)

This is to prevent a situation where a character's ID number is
used/saved for something, but that character deletes, and then someone
creates a character being assigned that previously used ID and then
the thing assigned to the original character's ID number is now
assigned to a different player.

In theory, you should be quite safe from running out of ID numbers,
especially if you squash the bug you reported of having one character
get assigned multiple ID numbers.  In particular, a long/int is
32-bits, and the max is the summation of the first 32 bits, meaning
it is (2^31)-1, or 2147483647.  To my best estimation, at even 7 new
characters per day (that's 49 per week, about 196 per month, and 2352
per year), which is--to the best of my estimation--improbable, it
would take you nearly 100,000 years to run out of ID numbers.

Correct me if I'm mistaken in my logic or math...

-dak


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST