Skip to content

fix: add missing drop-reason atoms to offset_reply() spec - #121

Merged
zmstone merged 1 commit into
kafka4beam:mainfrom
zmstone:260723-fix-offset-reply-spec
Jul 24, 2026
Merged

fix: add missing drop-reason atoms to offset_reply() spec#121
zmstone merged 1 commit into
kafka4beam:mainfrom
zmstone:260723-fix-offset-reply-spec

Conversation

@zmstone

@zmstone zmstone commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

The wolff:offset_reply() type spec was stale — it listed only buffer_overflow_discarded and message_too_large, but eval_ack_cb can deliver three more reason atoms to ack callbacks and send_sync callers:

  • partition_lost — producer terminating on partition loss (reply_error_for_all_reqs)
  • message_expiredmax_batch_age drops (new in 4.2.0)
  • max_retry_exceededmax_retry drops (new in 4.2.0)

The stale spec makes dialyzer reject downstream code that matches on these atoms in a wolff:send_sync/ack-callback result.

Also documented each reason atom on the type, and noted that the offset can be -1 when required_acks is none (fits kpro:offset() = int64(), so no spec change needed there).

No behavior change — spec and docs only. Intended for a 4.2.1 patch release.

The offset_reply() type was missing atoms which eval_ack_cb can
deliver to ack callbacks and send_sync callers:
- partition_lost: on partition loss (producer terminate)
- message_expired: max_batch_age drops (new in 4.2.0)
- max_retry_exceeded: max_retry drops (new in 4.2.0)

The stale spec makes dialyzer reject downstream code matching on
these atoms. No behavior change.
@zmstone
zmstone merged commit 4fa497f into kafka4beam:main Jul 24, 2026
4 checks passed
@zmstone
zmstone deleted the 260723-fix-offset-reply-spec branch July 24, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants