CompressionType.of fails under the Turkish locale

オープン 初心者向け
#11,512 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@sharanggupta がすでに取り組んでいます。

2026年11月12日 から。

  • #11513 @sharanggupta による — オープン
  • #11514 @xixi-box による — オープン

評価

難易度
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時間
マージ済み PR(30日)
17

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/rocketmq のほかの issue

apache/rocketmq の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。