Change fields in ShardStats to non-volatile 86/16386/3
authorTom Pantelis <tpanteli@brocade.com>
Sun, 8 Mar 2015 12:16:07 +0000 (08:16 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Thu, 12 Mar 2015 02:36:32 +0000 (22:36 -0400)
Most if the fields in ShardStats are volatile or AtomicLong counters.
While volatile guarantees immediate thread visibility, we can live with
eventual consistency to avoid the overhead of volatile writes on the
fast path as reads via JMX will be infrequent.

All of the counters except 1 are updated by Shard so concurrent updates
won't occur. failedReadTransactionsCount is updated by ShardTransaction
so we need to keep that as AtomicLong as it will be updated concurrently.
But it's a failure counter so will be updated infrequently.

Change-Id: I6a0f748bd595379243e0ea31d84f6c8d0989003a
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>

No differences found