Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Apache Kafka Apache Kafka
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • packagespackages
  • golanggolang
  • Asynchronous consistencyAsynchronous consistency
  • Apache KafkaApache Kafka
  • Merge requests
  • !1

[IN-757] Avoid error logs for expected Kafka shutdown cancellation

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged antonizsar13 requested to merge IN-757 into master Oct 28, 2026
  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 4

Kafka send and commit operations logged context canceled as an error during normal application shutdown. Suppress the error log only when the operation context is canceled and errors.Is(err, context.Canceled) is true. Broker failures, configuration errors, deadlines and cancellations with a live caller context remain error logs. Preserve returned errors so canceled sends and commits are never treated as successful delivery. Applies to send, commit, receive and offset error logging. Validation: targeted go test -race passed, including cancellation during an active local TCP request and regression tests that fail against the previous implementation. Broker-backed functional tests were not run. Consumer services need a new library release and dependency update to receive the fix.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: IN-757