@@ -417,7 +417,6 @@ def _unpack_records(self, tp, records):
417417 try :
418418 batch_offset = batch .base_offset + batch .last_offset_delta
419419 leader_epoch = batch .leader_epoch
420- self ._subscriptions .assignment [tp ].last_offset_from_record_batch = batch_offset
421420 # Control batches have a single record indicating whether a transaction
422421 # was aborted or committed.
423422 # When isolation_level is READ_COMMITTED (currently unsupported)
@@ -643,16 +642,6 @@ def _create_fetch_requests(self):
643642 for partition in self ._fetchable_partitions ():
644643 node_id = self ._client .cluster .leader_for_partition (partition )
645644
646- # advance position for any deleted compacted messages if required
647- if self ._subscriptions .assignment [partition ].last_offset_from_record_batch :
648- next_offset_from_batch_header = self ._subscriptions .assignment [partition ].last_offset_from_record_batch + 1
649- if next_offset_from_batch_header > self ._subscriptions .assignment [partition ].position .offset :
650- log .debug (
651- "Advance position for partition %s from %s to %s (last record batch location plus one)"
652- " to correct for deleted compacted messages and/or transactional control records" ,
653- partition , self ._subscriptions .assignment [partition ].position .offset , next_offset_from_batch_header )
654- self ._subscriptions .assignment [partition ].position = OffsetAndMetadata (next_offset_from_batch_header , '' , - 1 )
655-
656645 position = self ._subscriptions .assignment [partition ].position
657646
658647 # fetch if there is a leader and no in-flight requests
0 commit comments