Hi Charles, currently I checked in a new SequenceManager implementation SequenceManagerHiLoContinuousImpl as requested from you (Hope so ;-)). This implementation provide unique AND continuous id's during runtime. This version is 15% slower as the standard HiLo manager.
I also checked in a new junit test ...broker.SequenceManagerTest including your posted test cases. The test_getUniqueIdWithTwoBrokers() was commented out by default, because this test case failed with 'standard' HiLo manager. Please have a look at the new stuff. What do you mean? regards, Armin > Hi all, > > Each broker has it's own instance of a SequenceManager. This means that each > time a broker is created, a new SequenceManager is created; the > SequenceManagerHiLoImpl > does a grab of n ids when it is created. This means that two brokers, > pointing to the same PBKey (i.e. database) will not be producing contiguous > IDs. I attach a testcase with two tests illustrating this issue. > > This is not a huge issue, but one I think should be resolved at some point > in the near future. My immediate gut feeling is that there should be one > instance of SequenceManger created per PBKey, but I'm open to other > approaches. Essentially, I don't want to be "wasting" ids unnessarily, but I > also want the performance benefits of the HiLo generation algorithm - in > other words, I don't mind skipping IDs when a server app is restarted, but > I'd rather keep them contigous during a run. > > Cheers, > > Charles > > > This email and any attachments are strictly confidential and are intended > solely for the addressee. If you are not the intended recipient you must > not disclose, forward, copy or take any action in reliance on this message > or its attachments. If you have received this email in error please notify > the sender as soon as possible and delete it from your computer systems. > Any views or opinions presented are solely those of the author and do not > necessarily reflect those of HPD Software Limited or its affiliates. > > At present the integrity of email across the internet cannot be guaranteed > and messages sent via this medium are potentially at risk. All liability > is excluded to the extent permitted by law for any claims arising as a re- > sult of the use of this medium to transmit information by or to > HPD Software Limited or its affiliates. > > > > > ------------------------------------------------------------------------ -------- > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
