You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Felix-Gong (via GitHub)" <gi...@apache.org> on 2026/10/20 11:21:31 UTC

[I] [Bug] AdminSendMessage keeps only the first system property key, dropping the rest [rocketmq]

Felix-Gong opened a new issue, #11468:
URL: https://github.com/apache/rocketmq/issues/11468

   ### Search before asking
   
   I checked open and closed issues and PRs for `AdminSendMessage`, `system_properties.keys`, `buildAdminMessage` and `setKeys`. The open work on this class (#11356 / PR #11357 on message-group queue selection, #11406 on retry-topic ACL) does not touch the message-key path, and no existing report covers the repeated keys field.
   
   ### What happened?
   
   `AdminSendMessageRequest.system_properties.keys` is a repeated field, and the data plane keeps every entry: `SendMessageActivity` validates each key and calls `Message.setKeys(Collection)`, which joins the list. The admin surface does not. `ProxyAdminGrpcService.buildAdminMessage` reads the same field but keeps only the first non-empty entry:
   
   ```java
   for (String key : systemProperties.getKeysList()) {
       if (!key.isEmpty()) {
           message.setKeys(key);
           break;
       }
   }
   ```
   
   Send a message through `AdminSendMessage` with `system_properties.keys = ["k1", "k2", "k3"]` and the stored message carries only `k1`. The RPC answers `OK` with a message id, so nothing tells the caller that two index keys vanished. Messages keyed this way are then only findable by `k1` in key-based queries, which is the whole point of sending keys.
   
   The singular `key` field still works (covered by the existing `adminSendMessageCarriesTagsKeysAndPropertiesTest`); only the repeated `system_properties.keys` path is lossy.
   
   ### Runtime
   
   develop at 57c2dc0, Temurin 11 (the pinned surefire/ByteBuddy stack does not run on JDK 21). Reproduced with the existing `ProxyAdminGrpcServiceTest` mocks — no broker needed. On the unpatched service, the new test fails with:
   
   ```text
   expected:<key1[ key2 key3]> but was:<key1[]>
   ```
   
   ### Expected behavior
   
   Every non-empty entry of `system_properties.keys` ends up on the message, space-joined like the data plane does. Empty entries are skipped. Precedence stays as it is today: a non-empty `system_properties.keys` overrides the singular `key`; an all-empty list leaves the singular key in place.
   


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] AdminSendMessage keeps only the first system property key, dropping the rest [rocketmq]

Posted by "Felix-Gong (via GitHub)" <gi...@apache.org>.
Felix-Gong commented on issue #11468:
URL: https://github.com/apache/rocketmq/issues/11468#issuecomment-6289719700

   PR: #11469


-- 
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: [I] [Bug] AdminSendMessage keeps only the first system property key, dropping the rest [rocketmq]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #11468:
URL: https://github.com/apache/rocketmq/issues/11468#issuecomment-6290405549

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase.
   
   **Root Cause:** `ProxyAdminGrpcService.buildAdminMessage` iterates `systemProperties.getKeysList()` but breaks after the first non-empty key, dropping all subsequent keys. The data plane (`SendMessageActivity`) correctly joins all keys, but the admin path does not.
   
   **Impact:** Messages sent via `AdminSendMessage` with multiple `system_properties.keys` only retain the first key. Key-based queries cannot find messages by the dropped keys. The RPC returns success, so callers are unaware of data loss.
   
   **Severity:** medium — Data loss in the admin message path. The singular `key` field still works, and the data plane is unaffected.
   
   **Scope:** `ProxyAdminGrpcService.buildAdminMessage` in the Proxy module.
   
   An automated fix proposal will be generated. Reply `/approve` to proceed with PR generation.
   
   ---
   *Automated evaluation by RockteMQ-AI*
   


-- 
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