The date portion is only used to start the counter.
After the server is started, the counter is added as any other longer. And I don't
think any server in the workd would be able to overlap a long counter.
In an hipotetical situation where a server could overlap a long, we would just generate
IDs for messages that were already consumed, and that would be ok.
The only problem with the each 397 days, is when the date portion gets close to 7fffffff,
what would generate negative IDs after 200 million consumed messages. With the reset on
negative values we would be protected against that very edge condition.
20 MS... I just copied that from 1.4.... we could get rid of that. (But we don't use
the refresh for nothing but that very edge condition)
As for the negative loop, the above explains it why. That's a protection against a
very edge condition that would only happen if you started the server at a very specific
millisecond once every 368 days. I think we need to keep it, and I don't think we have
anything to worry about it. The ID generation seems safe to me.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179217#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...