chia7712 commented on a change in pull request #8905:
URL: https://github.com/apache/kafka/pull/8905#discussion_r443137945



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/state/internals/InMemoryTimeOrderedKeyValueBuffer.java
##########
@@ -299,16 +311,6 @@ private void restoreBatch(final 
Collection<ConsumerRecord<byte[], byte[]>> batch
                         minTimestamp = sortedMap.isEmpty() ? Long.MAX_VALUE : 
sortedMap.firstKey().time();
                     }
                 }
-
-                if (record.partition() != partition) {
-                    throw new IllegalStateException(
-                        String.format(
-                            "record partition [%d] is being restored by the 
wrong suppress partition [%d]",
-                            record.partition(),
-                            partition
-                        )
-                    );
-                }
             } else {
                 if (record.headers().lastHeader("v") == null) {

Review comment:
       nit:
   We seek the last header many times. Could we reuse the return value?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to