Skip to content

Commit

Permalink
backend: add leader epoch to partition api response
Browse files Browse the repository at this point in the history
  • Loading branch information
bojand committed Oct 23, 2024
1 parent 0fcaba7 commit fc897cd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions backend/pkg/console/topic_partitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ type TopicPartitionMarks struct {

// High water mark for this partition
High int64 `json:"waterMarkHigh"`

// LeaderEpoch, proposed in KIP-320 and introduced in Kafka 2.1.0 is the
// epoch of the broker leader.
//
// This field has a default of -1.
LeaderEpoch int32 `json:"leaderEpoch"`
}

// TopicPartitionLogDirs contains the reported log dir size for a single partition as reported by one
Expand Down Expand Up @@ -184,6 +190,7 @@ func (s *Service) GetTopicDetails(ctx context.Context, topicNames []string) ([]T
WaterMarksError: errToString(partitionMarks.Error),
Low: partitionMarks.Low,
High: partitionMarks.High,
LeaderEpoch: partition.LeaderEpoch,
},
PartitionLogDirs: logDirs,
}
Expand Down

0 comments on commit fc897cd

Please sign in to comment.