Skip to content

Commit d7bd753

Browse files
committed
Switch LatencyMetrics to use ThreadLocalTimer/ThreadLocalCounter
Patch by Dmitry Konstantinov; reviewed by Benedict Elliott Smith, Jyothsna Konisa for CASSANDRA-21080
1 parent e1699eb commit d7bd753

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
5.1
2+
* Switch LatencyMetrics to use ThreadLocalTimer/ThreadLocalCounter (CASSANDRA-21080)
23
* Accord: write rejections would be returned to users as server errors rather than INVALID and TxnReferenceOperation didn't handle all collections prperly (CASSANDRA-21061)
34
* Use byte[] directly in QueryOptions instead of ByteBuffer and convert them to ArrayCell instead of BufferCell to reduce allocations (CASSANDRA-20166)
45
* Log queries scanning too many SSTables per read (CASSANDRA-21048)

src/java/org/apache/cassandra/metrics/LatencyMetrics.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public void release()
167167
Metrics.remove(factory.createMetricName(namePrefix + "TotalLatency"));
168168
}
169169

170-
public class LatencyMetricsTimer extends OverrideTimer implements org.apache.cassandra.metrics.Timer
170+
public class LatencyMetricsTimer extends ThreadLocalTimer implements org.apache.cassandra.metrics.Timer
171171
{
172172
long releasedLatencyCount = 0;
173173

@@ -246,7 +246,7 @@ public Snapshot getSnapshot()
246246
}
247247
}
248248

249-
class LatencyMetricsCounter extends Counter
249+
class LatencyMetricsCounter extends ThreadLocalCounter
250250
{
251251
@Override
252252
public long getCount()

0 commit comments

Comments
 (0)