coderzc commented on PR #24439: URL: https://github.com/apache/pulsar/pull/24439#issuecomment-2996279412
> I prefer to make changes on the server side for several reasons. > > * Broker can handle this issue well and provide a compatibility solution. > * Add a flag for the valid compacted position can avoid deserializing and uncompressing the entire batch messages metadata header. > * If making this change at the client-side, it increases the complexity for the client, and all language clients need to change. > * It's weird to return EntryBuffer when getting the last message ID. > * Actually, Pulsar only needs to retain valid message data in a compacted entry, but it retains all compacted messages with "empty header" and "empty payload". If we purpose are to ensure that the compaction task is successful, we only need to check `lastCompactedPosition and lastDispatchablePosition` before trigger compaction task. If `lastDispatchablePosition <= lastCompactedPosition`, then I just need to skip the compact task because there is no new data need to be compacted. If we need make the Pulsar reader to read Kafka format data, then we need this change. -- 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]
