You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "ni-ze (via GitHub)" <gi...@apache.org> on 2023/05/11 03:20:24 UTC
[GitHub] [rocketmq] ni-ze commented on a diff in pull request #6678: [ISSUE #6677]Client Method RebalanceImpl#computePullFromWhere is marked with @Deprecated replace with computePullFromWhereWithException
ni-ze commented on code in PR #6678:
URL: https://github.com/apache/rocketmq/pull/6678#discussion_r1190595155
##########
client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceLitePullImpl.java:
##########
@@ -150,6 +151,11 @@ public long computePullFromWhereWithException(MessageQueue mq) throws MQClientEx
break;
}
}
+
+ if (result < 0) {
+ throw new MQClientException(ResponseCode.SYSTEM_ERROR, "Found unexpected result " + result);
+ }
+
Review Comment:
Many case will cause result equals to -1, It should be very carefully to throw a exception before it is does a bug.
It is not the same as method RebalancePushImpl#computePullFromWhereWithException
--
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