0xffff-zhiyan commented on code in PR #22805:
URL: https://github.com/apache/kafka/pull/22805#discussion_r3597621437
##########
core/src/main/scala/kafka/server/DynamicBrokerConfig.scala:
##########
@@ -106,7 +107,7 @@ object DynamicBrokerConfig {
Using.resource(
RecordsSnapshotReader.of(
rawSnapshotReader,
- raftManager.recordSerde,
+ new ControlAndDataDecodingStrategy(raftManager.recordSerde),
Review Comment:
Yeah, you're right about `batch.forEach` but see
[RecordsSnapshotReader.nextBatch()](https://github.com/apache/kafka/blob/trunk/raft/src/main/java/org/apache/kafka/snapshot/RecordsSnapshotReader.java#L135):
it assumes the first batch must be a control batch containing the snapshot
header. So `RecordsSnapshotReader` can only use
`ControlAndDataDecodingStrategy` or `ControlOnlyDecodingStrategy`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]