You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Jungtaek Lim (Jira)" <ji...@apache.org> on 2024/11/22 05:32:00 UTC

[jira] [Assigned] (SPARK-50301) TransformWithState metrics incorrectly counts the time for state removal

     [ https://issues.apache.org/jira/browse/SPARK-50301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jungtaek Lim reassigned SPARK-50301:
------------------------------------

    Assignee: Neil Ramaswamy

> TransformWithState metrics incorrectly counts the time for state removal
> ------------------------------------------------------------------------
>
>                 Key: SPARK-50301
>                 URL: https://issues.apache.org/jira/browse/SPARK-50301
>             Project: Spark
>          Issue Type: Improvement
>          Components: Structured Streaming
>    Affects Versions: 4.0.0
>            Reporter: Neil Ramaswamy
>            Assignee: Neil Ramaswamy
>            Priority: Major
>              Labels: pull-request-available
>
> In TWS, we use the streaming query progress metric `allRemovalsTimeMs` to actually count the amount of time it takes to process the user's timers. This is inconsistent with the other stateful operators, which use `allRemovalsTimeMs` to count the amount of time needed to remove state. The mis-labelling of the metric happens [here|https://github.com/apache/spark/blob/05508cf7cb9da3042fa4b17645102a6406278695/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/TransformWithStateExec.scala#L346].
> Note that this likely resulted as a copy-paste bug, since `flatMapGroupsWithState` has the same bug [here|https://github.com/apache/spark/blob/05508cf7cb9da3042fa4b17645102a6406278695/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FlatMapGroupsWithStateExec.scala#L132]. We should fix that too.
> Additionally, TWS uses `commitTimeMs` to capture the amount of time taken to perform state removal due to TTL. This is incorrect; this should actually be part of `allRemovalsTimeMs`.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org