Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

When a Kafka batch doesn't contain data in all partitions, subsequent ingestions will fail

Closed
#819 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #821 by @yruslan — merged

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
kafka, scala, spark

Research direction

The error text 'Cannot compare Kafka offsets with different number of partitions' is the place to start: search the repository for it to find where the offset maps from two batches are compared. Reproduce by running two consecutive ingestions where the second batch has no data for some partitions, then check how the stored offset map is read back. Done means the second ingestion succeeds with a partition gap and an existing test or a new one covers that case.

Written by the indexing model from the issue text.

Description

bug

Describe the bug

When a Kafka batch doesn't contain data in all partitions, subsequent ingestions will fail:

Caused by java.lang.IllegalArgumentException: Cannot compare Kafka offsets with different 
number of partitions: 9 and 6 
({"0":1623,"1":1541,"2":1815,"3":1273,"4":1422,"5":1562,"6":1373,"7":1458,"8":1436} 
vs 
{"0":1702,"1":1733,"2":1945,"4":1637,"5":1681,"7":1597}).

Code and/or configuration snippet that caused the issue

--

Expected behavior

Kafka ingestion should work in presence of gaps in partition for a given batch.

Context

  • Pramen/pramen-py version: 1.14.9
Dominant language
Scala
Stars
33
Forks
5
Avg merge
6h
Merged PRs (30d)
15

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AbsaOSS/pramen

All issues in AbsaOSS/pramen

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.