Spodii / netgore

Cross platform online rpg engine using C# and SFML
http://www.netgore.com/
40 stars 16 forks source link

Reduce recycling of IDs #255

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In some tables, IDs should no longer be recycled like they are now. This is 
mainly for tables that contain data that is not constant at runtime.

Tables that WILL recycle IDs:
 - item_template
 - character_template
 - alliance
 - map
 - map_spawn
 - shop
 - (etc...)

Tables that WILL NOT recycle IDs:
 - character
 - item
 - guild
 - (etc...)

Tables that will no longer recycle IDs will need to use AutoIncrement. This 
will require a bit of reworking the logic since a few of these contain server 
objects that do not always persist (e.g. Character) or can change between 
persistent and non-persistent (Item).

The main reason for this is for server clustering in the future. But it also 
reduces overhead slightly, and prevents issues when referencing instance IDs 
outside of the database.

It was done in the first place due to me not being too familiar with grabbing 
the AutoIncrement value in the MySQL .NET connector and the poor implementation 
of Item that caused instances to constantly be created and destroyed. But 
keeping it this way will only cause issues and be harder to fix as time goes on.

Original issue reported on code.google.com by Spodiii on 18 Nov 2010 at 10:06

GoogleCodeExporter commented 9 years ago

Original comment by Spodiii on 26 Nov 2010 at 9:47

GoogleCodeExporter commented 9 years ago

Original comment by Spodiii on 27 Nov 2010 at 12:34

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r4332.

Original comment by Spodiii on 27 Nov 2010 at 9:48