You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "YALI58 (via GitHub)" <gi...@apache.org> on 2026/08/08 20:16:45 UTC
[PR] [ISSUE-10861] Fix brokerControllerIdsToClean validation not actually parsing IDs [rocketmq]
YALI58 opened a new pull request, #10869:
URL: https://github.com/apache/rocketmq/pull/10869
### Bug Description
`cleanBrokerMetadata` command uses `Arrays.stream(...).map(Long::parseLong)` to validate broker controller IDs. Since `map()` is a lazy intermediate operation without a terminal operation, `Long.parseLong()` is never executed, allowing malformed IDs like `not-a-number` to pass validation.
### Fix
Changed `map()` to `forEach()` so the stream is actually consumed and `Long.parseLong()` is evaluated for each ID.
### Testing
Added `CleanControllerBrokerMetaSubCommandTest` with a test case that verifies malformed input throws `IllegalArgumentException`.
Closes #10861
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE-10861] Fix brokerControllerIdsToClean validation not actually parsing IDs [rocketmq]
Posted by "YALI58 (via GitHub)" <gi...@apache.org>.
YALI58 commented on PR #10869:
URL: https://github.com/apache/rocketmq/pull/10869#issuecomment-5302966909
Hi @RongtongJin @duhenglucky @vongosling, could one of you please take a look at this PR?
It fixes a validation bug (brokerControllerIdsToClean not actually parsed), includes a test case, and has already been approved by the AI bot. All CI checks are green (though statuses are still waiting to report). The only blocker is the requirement for an approving review from a maintainer with write access.
We would really appreciate your review and approval. Thanks in advance!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org