Hi Zlatin,
I agree that this access is unsynchronized and thus can be stale. Looking at
the implementation of HashMap.size, it doesn't need to do anything except
copy a single int, so it shouldn't be a cause for any errors beyond stale
data (ie it can't throw a ConcurrentModificationException).
I
Hello all,
Unless I'm missing something, the synchronization in FSNameSystemMetrics
on the 0.20 does not appear correct. It locks on itself while pulling
various metrics from the FSNameSystem object. For example,
FSNameSystem.getBlocksTotal() delegates to BlocksMap.size() which
delegates to the