Report delta StringSet counters for streaming by rohitsinha54 · Pull Request #33691 · apache/beam
Report delta stringset metrics for streaming rather than cumulative.
Reporting cumulative was causing the following issues:
- Every periodic (10 seconds) reports took cumulative over and over and reported it hence every report was reporting the metric. Unlike batch job reporting where it filters to only take one which has changed (tracked by dirty bit).
- Not reseting was using more memory as metrics remained in memory forever
- In backend it lead to large memory consumption when tracking active workitem counters which are also persisted for in level db by monitoring state store.
Tested that now we only see deltas
https://screenshot.googleplex.com/7W7R8Znv3mLgP8h
https://screenshot.googleplex.com/6GMLuRMe9zKrAMV
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
- Mention the appropriate issue in your description (for example:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead. - Update
CHANGES.mdwith noteworthy changes. - If this contribution is large, please file an Apache Individual Contributor License Agreement.
See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.