I'm using a BitSet idfactory (defult one) in my server, and last days it began to get bugged.
It reachs numbers which overflow the Integer.MAX_VALUE (2.1kkk) and generates NEGATIVE ids. Then, the server gets completely bugged.
The idFactory is skipping huge counts of ids, it doesn't increment the last id when generates a new one..
What could be the cause of that? And most important, how could I fix this issue?
(NO, I didn't mod anything there)
IdFactory overflowing!?
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- Pere
- Posts: 400
- Joined: Sat Jan 05, 2008 11:09 am
- Location: Catalunya, Berguedà
IdFactory overflowing!?
Bones tardes amics meus tots!
- Pere
- Posts: 400
- Joined: Sat Jan 05, 2008 11:09 am
- Location: Catalunya, Berguedà
Re: IdFactory overflowing!?
On BitSetIDFactory.initialize() I found that line:
_freeIds = new BitSet(PrimeFinder.nextPrime(100000));
And I can see that if the server had more objects on the DB that this nextPrime, the _freeIds BitSet will get bugged.. Or am I wrong??
By the way, my server has near 5kk objects (chars, clans, items..) in the DB. What idfactory do you recommend to me? Or just by increasing this nextPrime it should be enough?
_freeIds = new BitSet(PrimeFinder.nextPrime(100000));
And I can see that if the server had more objects on the DB that this nextPrime, the _freeIds BitSet will get bugged.. Or am I wrong??
By the way, my server has near 5kk objects (chars, clans, items..) in the DB. What idfactory do you recommend to me? Or just by increasing this nextPrime it should be enough?
Bones tardes amics meus tots!
- denser
- Posts: 1392
- Joined: Wed May 30, 2007 9:13 pm
- Location: Russia
- Contact:
Re: IdFactory overflowing!?
once in my scripts I used for unique id a linux tame-stamp, but still has problem of one-time items...
sometimes i get errors in my server about ids...try to figure out this
sometimes i get errors in my server about ids...try to figure out this
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
L2J - the place where glad to see you any time!