Skip to content

Commit

Permalink
Fixed hazelcast#3919 - management.CacheMBStatisticsBeanTest hangs
Browse files Browse the repository at this point in the history
  • Loading branch information
noctarius committed Oct 28, 2014
1 parent 3c69ee4 commit 7e00d8d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,12 @@ public void addRemoveTimeNanos(long duration) {
for (;;) {
long nanos = removeTimeTakenNanos;
if (nanos <= Long.MAX_VALUE - duration) {
if (REMOVALS_UPDATER.compareAndSet(this, nanos, nanos + duration)) {
if (REMOVE_TIME_TAKEN_NANOS_UPDATER.compareAndSet(this, nanos, nanos + duration)) {
return;
}
} else {
//counter full. Just reset.
if (REMOVALS_UPDATER.compareAndSet(this, nanos, duration)) {
if (REMOVE_TIME_TAKEN_NANOS_UPDATER.compareAndSet(this, nanos, duration)) {
clear();
return;
}
Expand Down

0 comments on commit 7e00d8d

Please sign in to comment.