[bugfix] Fix bulk pause for large monitor selections (#4447) by nihalritgithub · Pull Request #4458 · apache/hertzbeat · GitHub
Skip to content

[bugfix] Fix bulk pause for large monitor selections (#4447) - #4458

Merged
zqr10159 merged 2 commits into
apache:1.9.1from
nihalritgithub:fix-bulk-pause-over-200-4447-v1.9
Oct 20, 2026
Merged

zqr10159 merged 2 commits into
apache:1.9.1from
nihalritgithub:fix-bulk-pause-over-200-4447-v1.9

Conversation

@nihalritgithub

Copy link
Copy Markdown

What's changed?

Fixes #4447.

Problem

In HertzBeat v1.9.0, bulk pause requests send monitor IDs as URL query parameters. Large selections can exceed Tomcat's request-size limit, causing requests to fail before reaching the controller.

Changes

  • Updated the Angular frontend to send monitor IDs in the JSON request body.
  • Updated the backend controller to accept JSON-body IDs while preserving compatibility with existing query-parameter requests.
  • Updated OpenAPI documentation to clarify the request format and backward compatibility.
  • Added E2E regression tests covering large selections, invalid input, legacy requests, and cleanup.
  • Adjusted the E2E request timeout to accommodate bulk monitor creation.

Verification

  • Backend: 133 tests passed.
  • Frontend: 3 tests passed.
  • E2E: 74 tests passed, including 15 new cases.
  • Successfully paused 300 monitors in a single JSON-body request and verified their states.
  • Verified backward compatibility with existing query-parameter requests.
  • Confirmed the regression tests detect failures against the original v1.9.0 controller.
  • Checkstyle and git diff --check passed.

The E2E suite was executed locally against a running HertzBeat release build using the project's API-testing runner. Docker Compose execution was not performed.

Compatibility and risk

Existing query-parameter requests remain supported. The changes are limited to bulk pause functionality and do not affect other bulk operations.

The E2E suite takes approximately 5 minutes due to synchronous monitor initialization in v1.9.x.

AI assistance

None.

Checklist

Add or update API

Signed-off-by: Nihal Kumar Sharma <125385820+nihalritgithub@users.noreply.github.com>
Signed-off-by: Nihal Kumar Sharma <125385820+nihalritgithub@users.noreply.github.com>
@nihalritgithub

Copy link
Copy Markdown
Author

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.

2 participants