Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: A couple more schema fixes

...

Code Block
linenumberstrue
OffsetCommitRequest => GroupId Generation MemberId [TopicName [Partition Offset Timestamp LeaderEpoch Metadata]]
  GroupId => STRING
  Generation => INT32
  MemberId => STRING
  RetentionTime => INT64
  TopicName => STRING
  Partition => INT32
  Offset => INT64
  LeaderEpoch => INT32  // New
  Metadata => STRING

...

Code Block
TxnOffsetCommitRequest => TransactionalId GroupId ProducerId ProducerEpoch Topics
  GroupId => STRING
  Generation => INT32
  MemberId => STRING
  RetentionTime => INT64
  Topics => [TopicName [Partition Offset Timestamp LeaderEpoch Metadata]]  
    TopicName => STRING
    Partition => INT32
    Offset => INT64
    LeaderEpoch => INT32  // New
    Metadata => STRING

...

Code Block
linenumberstrue
OffsetFetchResponse => ThrottleTimeMs Topics ErrorCode
  ThrottleTimeMs => INT64
  Topics => [TopicName [Partition LeaderEpoch Offset TimestampLeaderEpoch Metadata ErrorCode]]
  	TopicName => STRING
  	Partition => INT32
  	Offset => INT64
  	LeaderEpoch => INT32  // New
  	Metadata => STRING
    ErrorCode => INT16
  ErrorCode => INT16

...

Code Block
linenumberstrue
ListOffsetRequest => ReplicaId [TopicName [Partition CurrentLeaderEpoch TimeTimestamp]]
 ReplicaId => INT32
 TopicName => STRING
 Partition => INT32
 CurrentLeaderEpoch => INT32 // New
 TimeTimestamp => INT64

Second, we add the leader epoch to the response that corresponds with the returned offset. The client can use this to reconcile the log prior to fetching from a new leader.

Code Block
linenumberstrue
ListOffsetResponse => ThrottleTimeMs Topics
  ThrottleTimeMs => INT64
  Topics => [TopicName [Partition ErrorCode Timestamp Offset LeaderEpoch Timestamp ErrorCode]]
    TopicName => STRING
    Partition => INT32
    ErrorCode => INT16
    Timestamp => INT64    
    Offset => INT64
    LeaderEpoch => INT32  // New

...