Skip to content

Negative derivative when using non-negative derivative due to negative duration #2844

@bjarke-nordunet

Description

@bjarke-nordunet

Hi, I've encountered an issue where I get negative rates as output from my tick script which a non-negative derivative.

The issue seems to be caused by a rare race condition in my specific environment, but in the end is caused by the derivative not checking if it's using a duration below 0:

if elapsed == 0 {

Kapacitor keeps information about the previous point - but this point may not always be chronologically before the new/incoming point.
If a point arrives which has a timestamp before the prev point, it will lead to a negative rate, even if the NonNegativeFlag is specified.

If any further information is needed, please let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions