Skip to content

Conversation

@rohitsinha54
Copy link
Contributor

@rohitsinha54 rohitsinha54 commented Jan 21, 2025

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, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with 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)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@rohitsinha54
Copy link
Contributor Author

R: @robertwb

@github-actions
Copy link
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

@rohitsinha54
Copy link
Contributor Author

Currently working on fixing the unit test.

@rohitsinha54 rohitsinha54 changed the title Report delta StringSet counters from for streaming Report delta StringSet counters for streaming Jan 21, 2025
@rohitsinha54
Copy link
Contributor Author

Ran testRequestKeyedData_sendOnShutdownStreamThrowsWindmillStreamShutdownException locally and it passes.

@rohitsinha54
Copy link
Contributor Author

@robertwb Can you have a look? Thanks.

@robertwb
Copy link
Contributor

LGTM. Test failure looks unrelated, re-running. There is a conflict that needs to be resolved as well.

@rohitsinha54
Copy link
Contributor Author

Resolved merge conflicts. I do not have write permission on repo and hence wouldn't be able to merge.
@robertwb Can you please help merge this once checks finishes? Thank you.

@rohitsinha54
Copy link
Contributor Author

The failing test seem unrelated.

@jrmccluskey jrmccluskey merged commit bbe6394 into apache:master Jan 30, 2025
18 of 20 checks passed
@rohitsinha54 rohitsinha54 deleted the delta-sset branch January 30, 2025 20:34
@Abacn
Copy link
Contributor

Abacn commented Jan 31, 2025

This gets merged with beam_PreCommit_Java failing extractMetricUpdatesStringSet due to this change

@liferoad
Copy link
Contributor

This breaks PreCommit Java.

tomstepp pushed a commit to tomstepp/apache-beam that referenced this pull request Feb 3, 2025
* Report delta StringSet counters from for streaming

* Update unit test
@rohitsinha54
Copy link
Contributor Author

Fixes #34052

VardhanThigle pushed a commit to VardhanThigle/beam that referenced this pull request Mar 21, 2025
* Report delta StringSet counters from for streaming

* Update unit test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants