Aias00 commented on PR #10689: URL: https://github.com/apache/rocketmq/pull/10689#issuecomment-5137983308
Addressed the latest feedback in commit `77c9853`:\n\n- Restored `TopicRouteWrapper.getMasterAddr(String)` with its original nullable `String` signature to preserve source/binary compatibility. Added `getOptionalMasterAddr(String)` for the new explicit missing-broker handling.\n- Updated the new call sites to use `getOptionalMasterAddr` while keeping existing callers compatible.\n- Added ordered-topic queue count validation: only `1..1024` is accepted. This covers zero, negative, `Integer.MAX_VALUE`, and integer overflow values without allocating large queue lists.\n- Added regression coverage for zero, negative, max-int, overflow, all-items-invalid, and missing-master ordered route cases.\n\nFor the consistency policy: this PR intentionally keeps the existing defensive behavior of building a view from valid route fragments and skipping malformed fragments. Fully rejecting a refreshed ordered-topic route and retaining the last valid view would require a cache-level policy change i n `TopicRouteService`, which is broader than this small parsing/validation fix and probably should be discussed separately.\n\nLocal verification passed:\n`mvn -pl proxy -Dtest=MessageQueueSelectorTest,ClusterTopicRouteServiceTest -DfailIfNoTests=false test` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
