Menu

#974 [HHQ-1838] MeasTabManagerUtil locks in each iteration of get

Bug
open
None
1
2012-10-09
2008-03-19
No

http://jira.hyperic.com/browse/HHQ-1838
 78 List ranges = MeasRangeObj.getInstance().getRanges();


 79 for (Iterator i=ranges.iterator(); i.hasNext(); )


 80 {


 81 MeasRange range = (MeasRange)i.next();


 82 String table = MeasRangeObj.getInstance().getTable(end);



line 82 should be written like this to avoid locking on each iteration of the for loop ->



 82 String table = MeasRangeObj.getInstance().getTable(ranges, end);



This obj's lock could be quite contentious in a larger environment so the less amount of locking the better. The change is extremely trivial and obvious.


Discussion

Anonymous
Anonymous

Add attachments
Cancel