Skip to content

Commit

Permalink
Remove consumer assignment for backups
Browse files Browse the repository at this point in the history
When instantiating the consumer we already a subscribe to the topic that
is to be backed up (ie. __schemas). Using assign on top of that causes
problems - once the assignment actually takes effect, the consumer
starts to consume from the beginning, ultimately resulting in an
`InconsistentOffset` error.

The default subscribe is enough at the moment, as we do not support
backing up a miltui-partition topic.
  • Loading branch information
Mátyás Kuti committed Jan 10, 2024
1 parent 7fde318 commit 7c57a1a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion karapace/backup/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,6 @@ def create_backup(
with _consumer(config, topic_name) as consumer:
(partition,) = consumer.partitions_for_topic(topic_name)
topic_partition = TopicPartition(topic_name, partition)
consumer.assign([topic_partition])

try:
data_file = _write_partition(
Expand Down

0 comments on commit 7c57a1a

Please sign in to comment.