Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-50301

TransformWithState metrics incorrectly counts the time for state removal

    XMLWordPrintableJSON

Details

    Description

      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.

      Note that this likely resulted as a copy-paste bug, since `flatMapGroupsWithState` has the same bug here. 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`.

      Attachments

        Issue Links

          Activity

            People

              neilramaswamy Neil Ramaswamy
              neilramaswamy Neil Ramaswamy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: