CompressionType.of fails under the Turkish locale
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 83/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- java
调研方向
在 RocketMQ 仓库中找到 CompressionType.of(String) 及其测试。阅读解析逻辑和附近的测试,然后在添加一个针对土耳其语区域设置下解析 zlib 的回归用例前后,运行相关测试。在该区域设置下,此用例解析为 ZLIB 压缩类型即为完成;issue 指出 Locale.ROOT 是预期的规范化方式。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
CompressionType.of(String) normalises the name with name.trim().toUpperCase() (no Locale). Under the Turkish locale (tr-TR, also az), a lower/mixed-case value containing i folds to the dotted capital İ, so "zlib".toUpperCase() -> "ZLİB", which does not match case "ZLIB" and falls through to throw new RuntimeException("Unsupported compress type name: ...").
Impact
A producer JVM under a Turkish default locale throws when the compression type is given in lower/mixed case, e.g. -Drocketmq.message.compressType=zlib (DefaultMQProducer reads rocketmq.message.compressType) or the benchmark -ct zlib. The uppercase form ZLIB (the default) is unaffected, so this only hits configs relying on the documented case-insensitive parsing.
Version: 5.5.1 and current develop.
Fix: toUpperCase(Locale.ROOT) — the keyword set is ASCII. One-line fix + regression test ready; happy to open a PR.
Sibling instances of the same root cause exist in the common module (TopicMessageType.getMetricsValue() metric labels; OS-name checks in NetworkUtil/MixAll) — can address in a follow-up if wanted.
- 主要语言
- Java
- 星标
- 22.7k
- 派生
- 12k
- 平均合并
- 3 天 18 小时
- 30 天内合并 PR
- 17
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/rocketmq 的其他 Issue
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configuration可能已有人在做 @amalsaidov 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
[rocketmq-client-python] TransactionMQProducer allocates an unused producer during initialization未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
[Bug] notifyMasterOnline aborts the long-polling wake-up with a NullPointerException when an arrival drains a bucket first可能已有人在做 @iloveeyjafjalla 于 29 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
apache/rocketmq#11441 · 1 条评论 ·
维护者通常 1 天内回复
-
[Enhancement] FilterFactory duplicate-registration and unregister semantics lack tests可能已有人在做 @chennaji9 于 34 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
apache/rocketmq#11340 · 2 条评论 ·
维护者通常 1 天内回复
-
[Enhancement] LogicExpression three-valued truth table and short-circuit behavior lack direct tests可能已有人在做 @chennaji9 于 34 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
apache/rocketmq#11339 · 2 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
bug emitter:client:csharp
难度 2/5 1-3 小时 新手友好度 84/100
microsoft/typespec#12572 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)未关闭
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
needs-area-label
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
area/ai area/backend component/zeebe kind/task
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
spAnser/reacharound#38 ·