cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aweisberg <...@git.apache.org>
Subject [GitHub] cassandra pull request #258: DecayingEstimatedHistogramReservoir.EstimatedHi...
Date Thu, 06 Sep 2018 16:38:27 GMT
Github user aweisberg commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/258#discussion_r215695991
  
    --- Diff: src/java/org/apache/cassandra/db/ColumnFamilyStore.java ---
    @@ -453,8 +454,12 @@ public void updateSpeculationThreshold()
         {
             try
             {
    -            sampleReadLatencyNanos = metadata().params.speculativeRetry.calculateThreshold(metric.coordinatorReadLatency);
    -            transientWriteLatencyNanos = metadata().params.speculativeWriteThreshold.calculateThreshold(metric.coordinatorWriteLatency);
    +            Snapshot readLatencySnapshot = metric.coordinatorReadLatency.getSnapshot();
    +            if (readLatencySnapshot.size() > 0)
    +                sampleReadLatencyNanos = metadata().params.speculativeRetry.calculateThreshold(readLatencySnapshot);
    +            Snapshot writeLatencySnapshot = metric.coordinatorWriteLatency.getSnapshot();
    +            if (writeLatencySnapshot.size() > 0)
    +                transientWriteLatencyNanos = metadata().params.speculativeWriteThreshold.calculateThreshold(writeLatencySnapshot);
    --- End diff --
    
    You are right for fixed policies it does the wrong thing. Good catch.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Mime
View raw message