You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/12/28 05:41:58 UTC
[GitHub] [rocketmq] xiaoyifang commented on a diff in pull request #5769: [ISSUE #5766] fix possible msg NPE
xiaoyifang commented on code in PR #5769:
URL: https://github.com/apache/rocketmq/pull/5769#discussion_r1058071140
##########
client/src/main/java/org/apache/rocketmq/client/impl/consumer/ProcessQueue.java:
##########
@@ -102,6 +98,10 @@ public void cleanExpiredMsg(DefaultMQPushConsumer pushConsumer) {
log.error("getExpiredMsg exception", e);
}
+ if (msg == null) {
+ break;
Review Comment:
I think it should be ok.
in most cases , the rest of msgTreeMap should be empty or interrupted ,in these cases , break the loop is reasonable.
if other cases ,the rest items can wait until the next clean
--
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