[
https://issues.apache.org/jira/browse/FLINK-24464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17425600#comment-17425600
]
Seth Wiesman commented on FLINK-24464:
--------------------------------------
resolved in master: 461cdde1b92c8f285e425c461aebff162366fc64
> Metrics sometimes report negative backlog
> -----------------------------------------
>
> Key: FLINK-24464
> URL: https://issues.apache.org/jira/browse/FLINK-24464
> Project: Flink
> Issue Type: Improvement
> Components: Stateful Functions
> Affects Versions: statefun-3.1.0
> Reporter: Seth Wiesman
> Assignee: Seth Wiesman
> Priority: Major
> Labels: pull-request-available
>
> As reported
> [here|https://stackoverflow.com/questions/69441309/negative-backlog-in-apache-flink-stateful-functions],
> the backlog metric sometimes reports a negative value. This is because the
> current count is stored in an in-memory variable, while the value used to
> decrement the count as the backlog clears is stored in Flink state. In the
> case of a job restart, the in-memory variable is reset to zero (it is a new
> instance) while the numbers in state are retained.
>
> A negative backlog is non-sensical, confusing, and should be prevented.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)