You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "fuyou001 (via GitHub)" <gi...@apache.org> on 2023/03/03 02:18:24 UTC

[GitHub] [rocketmq] fuyou001 commented on a diff in pull request #6219: [ISSUE #5779]RocketMQ compaction topic support tombstone messages

fuyou001 commented on code in PR #6219:
URL: https://github.com/apache/rocketmq/pull/6219#discussion_r1123962408


##########
store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:
##########
@@ -327,13 +336,20 @@ boolean shouldRetainMsg(final MessageExt msgExt, final OffsetMap map) throws Dig
         if (StringUtils.isNotBlank(key)) {
             boolean keyNotExistOrOffsetBigger = msgExt.getQueueOffset() >= map.get(key);
             boolean hasBody = ArrayUtils.isNotEmpty(msgExt.getBody());
-            return keyNotExistOrOffsetBigger && hasBody;
+            return keyNotExistOrOffsetBigger && !verifyDeleted(hasBody, msgExt);
         } else {
             log.error("message has no keys");

Review Comment:
   add messageId 



-- 
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