You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "wang-jiahua (via GitHub)" <gi...@apache.org> on 2026/06/21 01:49:58 UTC
[PR] [ISSUE #10534] Implement FastCodesHeader encode/decode for PullMessageRequestHeader/ResponseHeader [rocketmq]
wang-jiahua opened a new pull request, #10536:
URL: https://github.com/apache/rocketmq/pull/10536
<!-- Please make sure the target branch is right. In most case, the target branch should be `develop`. -->
### Which Issue(s) This PR Fixes
Fixes #10534
### Brief Description
Implement `FastCodesHeader.encode()/decode()` for `PullMessageRequestHeader` and `PullMessageResponseHeader` to eliminate reflection-based header serialization on the pull message hot path.
1. **`PullMessageRequestHeader`** — Fix `decode()` signature from `Map<String, String>` to `HashMap<String, String>`, optimize `encode()` with `writeLong`/`writeInt` for numeric fields.
2. **`PullMessageResponseHeader`** — Fix `decode()` signature, optimize `encode()` for 4 response fields.
### How Did You Test This Change?
1. **Compilation**: `remoting` module compiles cleanly on JDK 21.
2. **Commercial compatibility**: No commercial classes extend `PullMessageRequestHeader` or `PullMessageResponseHeader`.
3. **Microbenchmark** (R1 encode/decode bench): `writeIfNotNull` + `writeDecimalInt` is 25% faster than `value.toString()` + `writeStr` for encoding; `readStr` with single-byte cache is 56% faster for decoding.
--
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: [PR] [ISSUE #10534] Implement FastCodesHeader encode/decode for PullMessageRequestHeader/ResponseHeader [rocketmq]
Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin commented on code in PR #10536:
URL: https://github.com/apache/rocketmq/pull/10536#discussion_r3449490317
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java:
##########
@@ -85,13 +85,13 @@ public void encode(ByteBuf out) {
writeIfNotNull(out, "topic", topic);
writeIfNotNull(out, "liteTopic", liteTopic);
writeIfNotNull(out, "queueId", queueId);
- writeIfNotNull(out, "queueOffset", queueOffset);
+ writeLong(out, "queueOffset", queueOffset);
writeIfNotNull(out, "maxMsgNums", maxMsgNums);
writeIfNotNull(out, "sysFlag", sysFlag);
- writeIfNotNull(out, "commitOffset", commitOffset);
- writeIfNotNull(out, "suspendTimeoutMillis", suspendTimeoutMillis);
+ writeLong(out, "commitOffset", commitOffset);
+ writeLong(out, "suspendTimeoutMillis", suspendTimeoutMillis);
writeIfNotNull(out, "subscription", subscription);
- writeIfNotNull(out, "subVersion", subVersion);
+ writeLong(out, "subVersion", subVersion);
Review Comment:
This changes the missing-field behavior for `subVersion`: the old `Long` + `writeIfNotNull` path omitted it when unset, but the new primitive path always serializes `0`. There are proxy paths that set `subscription`/`expressionType` without setting `subVersion` (`PullMessageActivity` when it injects a subscription, and `ConsumerProcessor#pullMessage` when building the header). The broker uses `requestHeader.getSubVersion()` as the client filter version for non-tag filters, so defaulting to `0` can hide a missing required field and register/compare stale SQL filter data. Please either keep `subVersion` nullable/omitted here, or set it from `SubscriptionData#getSubVersion()` in those proxy paths and add a regression 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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #10534] Implement FastCodesHeader encode/decode for PullMessageRequestHeader/ResponseHeader [rocketmq]
Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin commented on code in PR #10536:
URL: https://github.com/apache/rocketmq/pull/10536#discussion_r3449490643
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageResponseHeader.java:
##########
@@ -52,10 +52,10 @@ public void checkFields() throws RemotingCommandException {
@Override
public void encode(ByteBuf out) {
- writeIfNotNull(out, "suggestWhichBrokerId", suggestWhichBrokerId);
- writeIfNotNull(out, "nextBeginOffset", nextBeginOffset);
- writeIfNotNull(out, "minOffset", minOffset);
- writeIfNotNull(out, "maxOffset", maxOffset);
+ writeLong(out, "suggestWhichBrokerId", suggestWhichBrokerId);
Review Comment:
These response fields also changed from "omit when unset" to "encode explicit 0". `PullMessageProcessor` creates this response header before validation, and several early error returns only set `forbiddenType`, code, and remark, so those responses will now include `suggestWhichBrokerId=0`, `nextBeginOffset=0`, `minOffset=0`, and `maxOffset=0` even though they were never populated. That can hide initialization bugs and changes the wire shape for error responses. Please keep the boxed/omitted semantics for response fields, or add tests proving every encoded response path intentionally carries those zero values.
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java:
##########
@@ -47,19 +47,19 @@ public class PullMessageRequestHeader extends TopicQueueRequestHeader implements
@CFNotNull
private Integer queueId;
@CFNotNull
- private Long queueOffset;
+ private long queueOffset;
Review Comment:
This is a protocol header API/schema surface change. The schema baselines still declare these fields as `java.lang.Long` with boxed setters in `test/src/test/resources/schema/protocol/common.protocol.header.PullMessageRequestHeader.schema` and `PullMessageResponseHeader.schema`, while this PR changes the storage type to primitive and adds primitive setter overloads. Please update the schema expectations, or explicitly document why this protocol/API baseline should remain unchanged.
--
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: [PR] [ISSUE #10534] Implement FastCodesHeader encode/decode for PullMessageRequestHeader/ResponseHeader [rocketmq]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #10536:
URL: https://github.com/apache/rocketmq/pull/10536#discussion_r3447775520
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java:
##########
@@ -246,6 +247,10 @@ public Long getQueueOffset() {
return queueOffset;
}
+ public void setQueueOffset(long queueOffset) {
+ this.queueOffset = queueOffset;
+ }
+
public void setQueueOffset(Long queueOffset) {
this.queueOffset = queueOffset;
}
Review Comment:
`setQueueOffset(Long)` now assigns a boxed `Long` into a primitive `long` field; passing `null` will throw a NullPointerException due to unboxing. Either drop the boxed overload or guard against null.
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java:
##########
@@ -23,6 +23,7 @@
import com.google.common.base.MoreObjects;
import io.netty.buffer.ByteBuf;
import java.util.HashMap;
+import java.util.HashMap;
Review Comment:
Duplicate `HashMap` import is redundant and should be removed to keep the import list clean.
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageResponseHeader.java:
##########
@@ -134,6 +147,10 @@ public Long getSuggestWhichBrokerId() {
return suggestWhichBrokerId;
}
+ public void setSuggestWhichBrokerId(long suggestWhichBrokerId) {
+ this.suggestWhichBrokerId = suggestWhichBrokerId;
+ }
+
public void setSuggestWhichBrokerId(Long suggestWhichBrokerId) {
this.suggestWhichBrokerId = suggestWhichBrokerId;
}
Review Comment:
`setSuggestWhichBrokerId(Long)` now assigns a boxed `Long` into a primitive `long` field; passing `null` will throw a NullPointerException due to unboxing. Either drop the boxed overload or guard against null.
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageResponseHeader.java:
##########
@@ -22,6 +22,7 @@
import io.netty.buffer.ByteBuf;
import java.util.HashMap;
+import java.util.HashMap;
Review Comment:
Duplicate `HashMap` import is redundant and should be removed to keep the import list clean.
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java:
##########
@@ -278,6 +287,10 @@ public Long getSuspendTimeoutMillis() {
return suspendTimeoutMillis;
}
+ public void setSuspendTimeoutMillis(long suspendTimeoutMillis) {
+ this.suspendTimeoutMillis = suspendTimeoutMillis;
+ }
+
public void setSuspendTimeoutMillis(Long suspendTimeoutMillis) {
this.suspendTimeoutMillis = suspendTimeoutMillis;
}
Review Comment:
`setSuspendTimeoutMillis(Long)` now assigns a boxed `Long` into a primitive `long` field; passing `null` will throw a NullPointerException due to unboxing. Either drop the boxed overload or guard against null.
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageResponseHeader.java:
##########
@@ -118,6 +123,10 @@ public Long getMinOffset() {
return minOffset;
}
+ public void setMinOffset(long minOffset) {
+ this.minOffset = minOffset;
+ }
+
public void setMinOffset(Long minOffset) {
this.minOffset = minOffset;
}
Review Comment:
`setMinOffset(Long)` now assigns a boxed `Long` into a primitive `long` field; passing `null` will throw a NullPointerException due to unboxing. Either drop the boxed overload or guard against null.
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java:
##########
@@ -270,6 +275,10 @@ public Long getCommitOffset() {
return commitOffset;
}
+ public void setCommitOffset(long commitOffset) {
+ this.commitOffset = commitOffset;
+ }
+
public void setCommitOffset(Long commitOffset) {
this.commitOffset = commitOffset;
}
Review Comment:
`setCommitOffset(Long)` now assigns a boxed `Long` into a primitive `long` field; passing `null` will throw a NullPointerException due to unboxing. Either drop the boxed overload or guard against null.
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java:
##########
@@ -294,6 +307,10 @@ public Long getSubVersion() {
return subVersion;
}
+ public void setSubVersion(long subVersion) {
+ this.subVersion = subVersion;
+ }
+
public void setSubVersion(Long subVersion) {
this.subVersion = subVersion;
}
Review Comment:
`setSubVersion(Long)` now assigns a boxed `Long` into a primitive `long` field; passing `null` will throw a NullPointerException due to unboxing. Either drop the boxed overload or guard against null.
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageResponseHeader.java:
##########
@@ -110,6 +111,10 @@ public Long getNextBeginOffset() {
return nextBeginOffset;
}
+ public void setNextBeginOffset(long nextBeginOffset) {
+ this.nextBeginOffset = nextBeginOffset;
+ }
+
public void setNextBeginOffset(Long nextBeginOffset) {
this.nextBeginOffset = nextBeginOffset;
}
Review Comment:
`setNextBeginOffset(Long)` now assigns a boxed `Long` into a primitive `long` field; passing `null` will throw a NullPointerException due to unboxing. Either drop the boxed overload or guard against null.
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageResponseHeader.java:
##########
@@ -126,6 +135,10 @@ public Long getMaxOffset() {
return maxOffset;
}
+ public void setMaxOffset(long maxOffset) {
+ this.maxOffset = maxOffset;
+ }
+
public void setMaxOffset(Long maxOffset) {
this.maxOffset = maxOffset;
}
Review Comment:
`setMaxOffset(Long)` now assigns a boxed `Long` into a primitive `long` field; passing `null` will throw a NullPointerException due to unboxing. Either drop the boxed overload or guard against null.
--
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: [PR] [ISSUE #10534] Implement FastCodesHeader encode/decode for PullMessageRequestHeader/ResponseHeader [rocketmq]
Posted by "wang-jiahua (via GitHub)" <gi...@apache.org>.
wang-jiahua commented on PR #10536:
URL: https://github.com/apache/rocketmq/pull/10536#issuecomment-4766521234
## Server Benchmark Results (2026-06-22)
**Environment**: 8C30G broker, Dragonwell JDK 21, 1KB msg, 128 queues, sync mode, 256 threads, 20s warmup + 30s collect
### Producer + Consumer (steady state, lines 3-5)
| Test | Producer TPS | Producer RT | Consumer TPS | Consumer RT | GC | vs Baseline |
|------|-------------|-------------|-------------|-------------|----|-------------|
| Baseline | 186k | 1.38ms | 187k | 167ms | 204 | — |
| #10536 | 198k | 1.29ms | 200k | 170ms | 100 | **Prod +6.5%, Con +7.0%, GC -51%** ✅ |
Pull header FastCodesHeader encode/decode eliminates reflection on every Pull request. In producer-only tests, the unused Pull code path caused JIT type profile pollution (-6.5%). With consumer running, the Pull path is exercised and shows +6.5% producer TPS, +7.0% consumer TPS, and 51% GC reduction.
--
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: [PR] [ISSUE #10534] Implement FastCodesHeader encode/decode for PullMessageRequestHeader/ResponseHeader [rocketmq]
Posted by "wang-jiahua (via GitHub)" <gi...@apache.org>.
wang-jiahua closed pull request #10536: [ISSUE #10534] Implement FastCodesHeader encode/decode for PullMessageRequestHeader/ResponseHeader
URL: https://github.com/apache/rocketmq/pull/10536
--
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: [PR] [ISSUE #10534] Implement FastCodesHeader encode/decode for PullMessageRequestHeader/ResponseHeader [rocketmq]
Posted by "wang-jiahua (via GitHub)" <gi...@apache.org>.
wang-jiahua commented on code in PR #10536:
URL: https://github.com/apache/rocketmq/pull/10536#discussion_r3449641004
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageResponseHeader.java:
##########
@@ -52,10 +52,10 @@ public void checkFields() throws RemotingCommandException {
@Override
public void encode(ByteBuf out) {
- writeIfNotNull(out, "suggestWhichBrokerId", suggestWhichBrokerId);
- writeIfNotNull(out, "nextBeginOffset", nextBeginOffset);
- writeIfNotNull(out, "minOffset", minOffset);
- writeIfNotNull(out, "maxOffset", maxOffset);
+ writeLong(out, "suggestWhichBrokerId", suggestWhichBrokerId);
Review Comment:
@/tmp/r36-t2.txt
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java:
##########
@@ -47,19 +47,19 @@ public class PullMessageRequestHeader extends TopicQueueRequestHeader implements
@CFNotNull
private Integer queueId;
@CFNotNull
- private Long queueOffset;
+ private long queueOffset;
Review Comment:
@/tmp/r36-t3.txt
--
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: [PR] [ISSUE #10534] Implement FastCodesHeader encode/decode for PullMessageRequestHeader/ResponseHeader [rocketmq]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #10536:
URL: https://github.com/apache/rocketmq/pull/10536#issuecomment-4764636742
## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/10536?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `0%` with `16 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 48.13%. Comparing base ([`c270c60`](https://app.codecov.io/gh/apache/rocketmq/commit/c270c60f8592aef32722d40c3d1bb1e3168b3aa1?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`84d9a01`](https://app.codecov.io/gh/apache/rocketmq/commit/84d9a01a608f9d99248d8048201a072813de49c8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 4 commits behind head on develop.
| [Files with missing lines](https://app.codecov.io/gh/apache/rocketmq/pull/10536?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...ting/protocol/header/PullMessageRequestHeader.java](https://app.codecov.io/gh/apache/rocketmq/pull/10536?src=pr&el=tree&filepath=remoting%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fremoting%2Fprotocol%2Fheader%2FPullMessageRequestHeader.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cmVtb3Rpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3JlbW90aW5nL3Byb3RvY29sL2hlYWRlci9QdWxsTWVzc2FnZVJlcXVlc3RIZWFkZXIuamF2YQ==) | 0.00% | [8 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10536?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...ing/protocol/header/PullMessageResponseHeader.java](https://app.codecov.io/gh/apache/rocketmq/pull/10536?src=pr&el=tree&filepath=remoting%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fremoting%2Fprotocol%2Fheader%2FPullMessageResponseHeader.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cmVtb3Rpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3JlbW90aW5nL3Byb3RvY29sL2hlYWRlci9QdWxsTWVzc2FnZVJlc3BvbnNlSGVhZGVyLmphdmE=) | 0.00% | [8 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10536?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## develop #10536 +/- ##
=============================================
- Coverage 48.18% 48.13% -0.06%
+ Complexity 13407 13401 -6
=============================================
Files 1377 1377
Lines 100838 100856 +18
Branches 13034 13035 +1
=============================================
- Hits 48590 48547 -43
- Misses 46314 46339 +25
- Partials 5934 5970 +36
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/rocketmq/pull/10536?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
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: [PR] [ISSUE #10534] Implement FastCodesHeader encode/decode for PullMessageRequestHeader/ResponseHeader [rocketmq]
Posted by "wang-jiahua (via GitHub)" <gi...@apache.org>.
wang-jiahua commented on code in PR #10536:
URL: https://github.com/apache/rocketmq/pull/10536#discussion_r3447810416
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageResponseHeader.java:
##########
@@ -110,6 +111,10 @@ public Long getNextBeginOffset() {
return nextBeginOffset;
}
+ public void setNextBeginOffset(long nextBeginOffset) {
+ this.nextBeginOffset = nextBeginOffset;
+ }
+
public void setNextBeginOffset(Long nextBeginOffset) {
this.nextBeginOffset = nextBeginOffset;
}
Review Comment:
@/tmp/r3-npe.txt
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageResponseHeader.java:
##########
@@ -118,6 +123,10 @@ public Long getMinOffset() {
return minOffset;
}
+ public void setMinOffset(long minOffset) {
+ this.minOffset = minOffset;
+ }
+
public void setMinOffset(Long minOffset) {
this.minOffset = minOffset;
}
Review Comment:
@/tmp/r3-npe.txt
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageResponseHeader.java:
##########
@@ -126,6 +135,10 @@ public Long getMaxOffset() {
return maxOffset;
}
+ public void setMaxOffset(long maxOffset) {
+ this.maxOffset = maxOffset;
+ }
+
public void setMaxOffset(Long maxOffset) {
this.maxOffset = maxOffset;
}
Review Comment:
@/tmp/r3-npe.txt
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageResponseHeader.java:
##########
@@ -134,6 +147,10 @@ public Long getSuggestWhichBrokerId() {
return suggestWhichBrokerId;
}
+ public void setSuggestWhichBrokerId(long suggestWhichBrokerId) {
+ this.suggestWhichBrokerId = suggestWhichBrokerId;
+ }
+
public void setSuggestWhichBrokerId(Long suggestWhichBrokerId) {
this.suggestWhichBrokerId = suggestWhichBrokerId;
}
Review Comment:
@/tmp/r3-npe.txt
--
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: [PR] [ISSUE #10534] Implement FastCodesHeader encode/decode for PullMessageRequestHeader/ResponseHeader [rocketmq]
Posted by "wang-jiahua (via GitHub)" <gi...@apache.org>.
wang-jiahua commented on code in PR #10536:
URL: https://github.com/apache/rocketmq/pull/10536#discussion_r3447810271
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java:
##########
@@ -246,6 +247,10 @@ public Long getQueueOffset() {
return queueOffset;
}
+ public void setQueueOffset(long queueOffset) {
+ this.queueOffset = queueOffset;
+ }
+
public void setQueueOffset(Long queueOffset) {
this.queueOffset = queueOffset;
}
Review Comment:
@/tmp/r3-npe.txt
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java:
##########
@@ -270,6 +275,10 @@ public Long getCommitOffset() {
return commitOffset;
}
+ public void setCommitOffset(long commitOffset) {
+ this.commitOffset = commitOffset;
+ }
+
public void setCommitOffset(Long commitOffset) {
this.commitOffset = commitOffset;
}
Review Comment:
@/tmp/r3-npe.txt
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java:
##########
@@ -278,6 +287,10 @@ public Long getSuspendTimeoutMillis() {
return suspendTimeoutMillis;
}
+ public void setSuspendTimeoutMillis(long suspendTimeoutMillis) {
+ this.suspendTimeoutMillis = suspendTimeoutMillis;
+ }
+
public void setSuspendTimeoutMillis(Long suspendTimeoutMillis) {
this.suspendTimeoutMillis = suspendTimeoutMillis;
}
Review Comment:
@/tmp/r3-npe.txt
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java:
##########
@@ -294,6 +307,10 @@ public Long getSubVersion() {
return subVersion;
}
+ public void setSubVersion(long subVersion) {
+ this.subVersion = subVersion;
+ }
+
public void setSubVersion(Long subVersion) {
this.subVersion = subVersion;
}
Review Comment:
@/tmp/r3-npe.txt
--
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: [PR] [ISSUE #10534] Implement FastCodesHeader encode/decode for PullMessageRequestHeader/ResponseHeader [rocketmq]
Posted by "wang-jiahua (via GitHub)" <gi...@apache.org>.
wang-jiahua commented on PR #10536:
URL: https://github.com/apache/rocketmq/pull/10536#issuecomment-4785548798
Closing this PR. After review, the actual changes (primitive long setter overloads) do not provide meaningful performance optimization. The FastCodesHeader encode/decode methods already exist in develop for PullMessageRequestHeader/ResponseHeader. The original optimization (Long→long field type change) was reverted due to wire format concerns, leaving only unused setter overloads.
--
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