Aleksey Plekhanov created IGNITE-17895:
------------------------------------------

             Summary: Assertion on histogram update if currentTimeMillis 
decreases
                 Key: IGNITE-17895
                 URL: https://issues.apache.org/jira/browse/IGNITE-17895
             Project: Ignite
          Issue Type: Bug
            Reporter: Aleksey Plekhanov
            Assignee: Aleksey Plekhanov


Histogram metric classes (\{{HistogramMetricImpl}}, 
\{{PeriodicHistogramMetricImpl}}) assume that timestamp is always increasing, 
but in some cases method {{U.currentTimeMillis()}} can return decreasing values 
(for example, if time was set manually or on NTP sync). In these cases 
assertion can be thrown on histogram update:
{noformat}
java.lang.AssertionError: null
at 
org.apache.ignite.internal.processors.metric.impl.HistogramMetricImpl.value(HistogramMetricImpl.java:61)
 ~[classes/:?]
at 
org.apache.ignite.internal.util.StripedExecutor$Stripe.body(StripedExecutor.java:643)
 [classes/:?]
at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:125) 
[classes/:?]
at java.lang.Thread.run(Thread.java:750) [?:1.8.0_322]{noformat}
We should fix {{PeriodicHistogramMetricImpl#add}} and 
{{HistogramMetricImpl#value}} methods to work correctly with decreasing 
timestamps.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to