hachikuji commented on pull request #9819: URL: https://github.com/apache/kafka/pull/9819#issuecomment-754982648
@dengziming Thanks for the patch. I have one high level comment. The approach we've taken here is to implement a new zero-copy "region" type. One alternative is to use the existing "records" type since it already supports "zero-copy" and the snapshot data is expected to be records data anyway. I'd like to understand the drawbacks of this approach a bit better. I think having two zero-copy types is a bit undesirable. An alternative is that we can let the "region" type subsume "records," but I suspect that will be tricky because of the down-conversion logic. @jsancio also suggested that we might be able to represent the "region" type using `type=bytes zeroCopy=true`. I think that would require us to introduce an interface of some kind so that we can represent both a ByteBuffer and FileChannel. I'm not sure what that would look like, but it's also worth considering. Anyway, just want to make sure we have covered all of the options before getting too far with this. ---------------------------------------------------------------- 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: us...@infra.apache.org