@@ -253,10 +253,9 @@ def _retrieve_offsets(self, timestamps, timeout_ms=float("inf")):
253253 or ``timeout_ms`` passed.
254254
255255 Arguments:
256- timestamps: {TopicPartition: (int, int)} dict with (timestamp, leader_epoch)
257- tuples s to fetch offsets by. Timestamp is -1 for the latest available, and
258- -2 for the earliest available. Otherwise timestamp is treated as epoch milliseconds.
259- Leader epoch is -1 to ignore, otherwise last known epoch value from partition.
256+ timestamps: {TopicPartition: int} dict with timestamps to fetch
257+ offsets by. -1 for the latest available, -2 for the earliest
258+ available. Otherwise timestamp is treated as epoch milliseconds.
260259
261260 Returns:
262261 {TopicPartition: OffsetAndTimestamp}: Mapping of partition to
@@ -385,7 +384,8 @@ def _append(self, drained, part, max_records, update_offsets):
385384 drained [tp ].append (record )
386385
387386 if update_offsets :
388- self ._subscriptions .assignment [tp ].position = OffsetAndMetadata (next_offset , '' , leader_epoch )
387+ # TODO: save leader_epoch
388+ self ._subscriptions .assignment [tp ].position = OffsetAndMetadata (next_offset , '' , - 1 )
389389 return len (part_records )
390390
391391 else :
@@ -549,7 +549,7 @@ def _send_list_offsets_requests(self, timestamps):
549549 return Future ().failure (
550550 Errors .LeaderNotAvailableError (partition ))
551551 else :
552- leader_epoch = self . _client . cluster . leader_epoch_for_partition ( partition )
552+ leader_epoch = - 1
553553 timestamps_by_node [node_id ][partition ] = (timestamp , leader_epoch )
554554
555555 # Aggregate results until we have all
0 commit comments