Proxy gRPC metric settings should tolerate invalid collector address
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start in proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/common/GrpcClientSettingsManager.java and inspect GrpcClientSettingsManager.mergeMetric(...), especially the metricCollectorAddress parsing. Verify behavior for blank or malformed addresses, confirm that a clear warning is logged and metric collection is disabled without breaking settings generation, and preserve valid host:port handling.
Written by the indexing model from the issue text.
Description
Problem
GrpcClientSettingsManager.mergeMetric(...) parses the configured metric collector address with a raw split:
String[] split = metricCollectorAddress.split(":");
String host = split[0];
int port = Integer.parseInt(split[1]);
When metricCollectorMode=on but metricCollectorAddress is blank or malformed, the settings merge path can throw ArrayIndexOutOfBoundsException or NumberFormatException. That can break gRPC client settings generation instead of returning a controlled metric setting.
Expected behavior
Proxy should not fail client settings merge because of an invalid optional metric collector address. It should validate the address, log a clear warning, and disable metric collection for that settings response when the address cannot be parsed.
Scope
Track 2 / Proxy gRPC client diagnostics and robustness. This only hardens metric endpoint parsing in gRPC client settings and should not change valid host:port handling.
Evidence
proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/common/GrpcClientSettingsManager.javamergeMetric(...)readsmetricCollectorAddress.split(":")and indexessplit[1]without validation.
- Dominant language
- Java
- Stars
- 22.6k
- Forks
- 12k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/rocketmq
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
[Bug] TopicValidator rejects V2 retry topic names containing `+` separator introduced by KeyBuilder Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100