You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by du...@apache.org on 2020/02/27 12:16:12 UTC
[rocketmq] branch develop updated: [ISSUE #1787] Fix the issue that
queryCq command of mqadmin returned incorrect data (#1793)
This is an automated email from the ASF dual-hosted git repository.
duhengforever pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new fc3fb2f [ISSUE #1787] Fix the issue that queryCq command of mqadmin returned incorrect data (#1793)
fc3fb2f is described below
commit fc3fb2fdbe1d3c34299eb209e71d8f8aae54962e
Author: rongtong <ji...@163.com>
AuthorDate: Thu Feb 27 20:15:56 2020 +0800
[ISSUE #1787] Fix the issue that queryCq command of mqadmin returned incorrect data (#1793)
* fix(tools):fix the issue that queryCq command of mqadmin returned incorrect data
* fix(mqadmin):set status code in advance in queryConsumeQueue method
---
.../org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java b/broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java
index b2edc1a..2b077cb 100644
--- a/broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java
+++ b/broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java
@@ -1493,11 +1493,9 @@ public class AdminBrokerProcessor implements NettyRequestProcessor {
response.setRemark(String.format("%d@%s is not exist!", requestHeader.getQueueId(), requestHeader.getTopic()));
return response;
}
-
- QueryConsumeQueueResponseBody body = new QueryConsumeQueueResponseBody();
response.setCode(ResponseCode.SUCCESS);
- response.setBody(body.encode());
+ QueryConsumeQueueResponseBody body = new QueryConsumeQueueResponseBody();
body.setMaxQueueIndex(consumeQueue.getMaxOffsetInQueue());
body.setMinQueueIndex(consumeQueue.getMinOffsetInQueue());
@@ -1556,7 +1554,7 @@ public class AdminBrokerProcessor implements NettyRequestProcessor {
} finally {
result.release();
}
-
+ response.setBody(body.encode());
return response;
}