Hi;
I've found a problem with the formula used to calculate whether or not a
Region's nodeEventQueue is approaching capacity.
According to my calculation, the following line from putNodeEvent, would
actually mean the user would never see a warning (which was my observation).
if( nodeEventQueue_.size() > ((100*RegionManager.CAPACITY)/98) {
Breaking the math down a litter further, you can see the problem:
(100*RegionManager.CAPACITY)/98)
| (100 * 200000) / 98
| (20000000) / 98
| 204081
Therefore the above code evaluated at runtime is really:
if( nodeEventQueue_.size() > (204081) {
Since the buffer has a hardcoded limit of 200000, this means the warning will
never be shown.
I'd suggest fixing the problem by declaring a constant as follows:
private final static int CAPACITY_WARN_THRESHOLD =
(100*RegionManager.CAPACITY)*102;
The above will evaluate to 196078, which is I think more like what we're
looking for.
Then, obviously change the code to use the constant:
if( nodeEventQueue_.size() > (CAPACITY_WARN_THRESHOLD) {
If you'd like me to report this on Jira, just let me know.
Regards,
Brian.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3880920#3880920
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3880920
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user