This is an automated email from the ASF dual-hosted git repository.
konstantinov pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/trunk by this push:
new d7bd75303f Switch LatencyMetrics to use
ThreadLocalTimer/ThreadLocalCounter
d7bd75303f is described below
commit d7bd75303f2511ea1efa209864f282cedbefa755
Author: Dmitry Konstantinov <[email protected]>
AuthorDate: Tue Dec 16 21:15:27 2025 +0000
Switch LatencyMetrics to use ThreadLocalTimer/ThreadLocalCounter
Patch by Dmitry Konstantinov; reviewed by Benedict Elliott Smith, Jyothsna
Konisa for CASSANDRA-21080
---
CHANGES.txt | 1 +
src/java/org/apache/cassandra/metrics/LatencyMetrics.java | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index ac47a545f3..2be609ddf6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
5.1
+ * Switch LatencyMetrics to use ThreadLocalTimer/ThreadLocalCounter
(CASSANDRA-21080)
* Accord: write rejections would be returned to users as server errors rather
than INVALID and TxnReferenceOperation didn't handle all collections prperly
(CASSANDRA-21061)
* Use byte[] directly in QueryOptions instead of ByteBuffer and convert them
to ArrayCell instead of BufferCell to reduce allocations (CASSANDRA-20166)
* Log queries scanning too many SSTables per read (CASSANDRA-21048)
diff --git a/src/java/org/apache/cassandra/metrics/LatencyMetrics.java
b/src/java/org/apache/cassandra/metrics/LatencyMetrics.java
index dda9844752..01891812f0 100644
--- a/src/java/org/apache/cassandra/metrics/LatencyMetrics.java
+++ b/src/java/org/apache/cassandra/metrics/LatencyMetrics.java
@@ -167,7 +167,7 @@ public class LatencyMetrics
Metrics.remove(factory.createMetricName(namePrefix + "TotalLatency"));
}
- public class LatencyMetricsTimer extends OverrideTimer implements
org.apache.cassandra.metrics.Timer
+ public class LatencyMetricsTimer extends ThreadLocalTimer implements
org.apache.cassandra.metrics.Timer
{
long releasedLatencyCount = 0;
@@ -246,7 +246,7 @@ public class LatencyMetrics
}
}
- class LatencyMetricsCounter extends Counter
+ class LatencyMetricsCounter extends ThreadLocalCounter
{
@Override
public long getCount()
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]