pkolaczk commented on code in PR #3102:
URL: https://github.com/apache/cassandra/pull/3102#discussion_r1491010145
##########
src/java/org/apache/cassandra/metrics/DecayingEstimatedHistogramReservoir.java:
##########
@@ -250,7 +248,7 @@ public void update(long value)
int index = findIndex(bucketOffsets, value);
- updateBucket(decayingBuckets, index,
Math.round(forwardDecayWeight(now)));
+ decayingBuckets.update(index, now);
Review Comment:
Well, personally I don't like the lack of symmetry here as well, but, well,
decayingBuckets does more than regular buckets and it had to be extracted in
order to be able to set the reference atomically. Extracting this to a separate
method makes the code more readable and less error prone.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]