Skip to content

Commit

Permalink
remove unnecessary judge
Browse files Browse the repository at this point in the history
  • Loading branch information
loongs-zhang committed Jul 20, 2024
1 parent 933ffc0 commit e3f3c3a
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ private RemotingCommand rewriteRequestForStaticTopic(PullMessageRequestHeader re
LogicQueueMappingItem mappingItem = TopicQueueMappingUtils.findLogicQueueMappingItem(mappingContext.getMappingItemList(), globalOffset, true);
mappingContext.setCurrentItem(mappingItem);

if (globalOffset < mappingItem.getLogicOffset()) {
//if (globalOffset < mappingItem.getLogicOffset()) {
//handleOffsetMoved
//If the physical queue is reused, we should handle the PULL_OFFSET_MOVED independently
//Otherwise, we could just transfer it to the physical process
}
//}
//below are physical info
String bname = mappingItem.getBname();
Integer phyQueueId = mappingItem.getQueueId();
Expand Down Expand Up @@ -536,14 +536,13 @@ private RemotingCommand processRequest(final Channel channel, RemotingCommand re
getMessageResult.setNextBeginOffset(broadcastInitOffset);
} else {
SubscriptionData finalSubscriptionData = subscriptionData;
RemotingCommand finalResponse = response;
messageStore.getMessageAsync(group, topic, queueId, requestHeader.getQueueOffset(),
requestHeader.getMaxMsgNums(), messageFilter)
.thenApply(result -> {
if (null == result) {
finalResponse.setCode(ResponseCode.SYSTEM_ERROR);
finalResponse.setRemark("store getMessage return null");
return finalResponse;
response.setCode(ResponseCode.SYSTEM_ERROR);
response.setRemark("store getMessage return null");
return response;
}
brokerController.getColdDataCgCtrService().coldAcc(requestHeader.getConsumerGroup(), result.getColdDataSum());
return pullMessageResultHandler.handle(
Expand All @@ -555,7 +554,7 @@ private RemotingCommand processRequest(final Channel channel, RemotingCommand re
subscriptionGroupConfig,
brokerAllowSuspend,
messageFilter,
finalResponse,
response,
mappingContext,
beginTimeMills
);
Expand Down

0 comments on commit e3f3c3a

Please sign in to comment.