sqrl-lang / sqrl

A safe, stateful rules language for event streams
Apache License 2.0
113 stars 11 forks source link

Fix out-of-order timestamp bug with ratelimit #14

Closed qix closed 2 years ago

qix commented 2 years ago

Problem

Out of order timestamps could trigger ratelimiter more often that it was specified for

Solution

Don't allow out of order timestamps in ratelimit. If the new timestamp was before the last seen one, just move it up to the last seen one.

Result

Added a test case which now passes