Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update module github.com/twmb/franz-go to v1.18.0 #32

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 26, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
github.com/twmb/franz-go v1.16.1 -> v1.18.0 age adoption passing confidence

Release Notes

twmb/franz-go (github.com/twmb/franz-go)

v1.18.0

Compare Source

===

This release adds support for Kafka 3.7, adds a few community requested APIs,
some internal improvements, and fixes two bugs. One of the bugfixes is for a
deadlock; it is recommended to bump to this release to ensure you do not run
into the deadlock. The features in this release are relatively small.

This adds protocol support for KIP-890 and KIP-994, and
adds further protocol support for [KIP-848][KIP-848]. If you are using
transactions, you may see a new kerr.TransactionAbortable error, which
signals that your ongoing transaction should be aborted and will not be
successful if you try to commit it.

Lastly, there have been a few improvements to pkg/sr that are not mentioned
in these changelog notes.

Bug fixes

  • If you canceled the context used while producing while your client was
    at the maximum buffered records or bytes, it was possible to experience
    deadlocks. This has been fixed. See #​832 for more details.

  • Previously, if using GetConsumeTopics while regex consuming, the function
    would return all topics ever discovered. It now returns only the topics that
    are being consumed.

Improvements

  • The client now internaly ignores OutOfOrderSequenceNumber errors that are
    encountered when consuming if possible. If a producer produces very infrequently,
    it is possible the broker forgets the producer by the next time the producer
    produces. In this case, the producer receives an OutOfOrderSequenceNumber error.
    The client now internally resets properly so that you do not see the error.

Features

  • AllowRebalance and CloseAllowingRebalance have been added to GroupTransactSession.
  • The FetchTopic type now has includes the topic's TopicID.
  • The ErrGroupSession internal error field is now public, allowing you to test how you handle the internal error.
  • You may now receive a kerr.TransactionAbortable error from many functions while using transactions.

Relevant commits

  • 0fd1959d kgo: support Kafka 3.8's kip-890 modifications
  • 68163c55 bugfix kgo: do not add all topics to internal tps map when regex consuming
  • 3548d1f7 improvement kgo: ignore OOOSN where possible
  • 6a759401 bugfix kgo: fix potential deadlock when reaching max buffered (records|bytes)
  • 4bfb0c68 feature kgo: add TopicID to the FetchTopic type
  • 06a9c47d feature kgo: export the wrapped error from ErrGroupSession
  • 4affe8ef feature kgo: add AllowRebalance and CloseAllowingRebalance to GroupTransactSession

v1.17.1

Compare Source

===

This patch release fixes four bugs (two are fixed in one commit), contains two
internal improvements, and adds two other minor changes.

Bug fixes

  • If you were using the MaxBufferedBytes option and ever hit the max, odds are
    likely that you would experience a deadlock eventually. That has been fixed.

  • If you ever produced a record with no topic field and without using DefaultProduceTopic,
    or if you produced a transactional record while not in a transaction, AND if the client
    was at the maximum buffered records, odds are you would eventually deadlock.
    This has been fixed.

  • It was previously not possible to set lz4 compression levels.

  • There was a data race on a boolean field if a produce request was being
    written at the same time a metadata update happened, and if the metadata
    update has an error on the topic or partition that is actively being written.
    Note that the race was unlikely and if you experienced it, you would have noticed
    an OutOfOrderSequenceNumber error. See this comment
    for more details.

Improvements

  • Canceling the context you pass to Produce now propagates in two more areas:
    the initial InitProducerID request that occurs the first time you produce,
    and if the client is internally backing off due to a produce request failure.
    Note that there is no guarantee on which context is used for cancelation if
    you produce many records, and the client does not allow canceling if it is
    currently unsafe to do so. However, this does mean that if your cluster is
    somewhat down such that InitProducerID is failing on your new client, you
    can now actually cause the Produce to quit. See this comment
    for what it means for a record to be "safe" to fail.

  • The client now ignores aborted records while consuming only if you have
    configured FetchIsolationLevel(ReadCommitted()). Previously, the client relied
    entirely on the FetchResponse AbortedTransactions field, but it's possible
    that brokers could send aborted transactions even when not using read committed.
    Specifically, this was a behavior difference in Redpanda, and the KIP that introduced
    transactions and all relevant documents do not mention what the broker behavior
    actually should be here. Redpanda itself was also changed to not send aborted
    transactions when using read committed, but we may as well improve franz-go as well.

  • Decompression now better reuses buffers under the hood, reducing allocations.

  • Brokers that return preferred replicas to fetch from now causes an info level
    log in the client.

Relevant commits

  • 305d8dc kgo: allow record ctx cancelation to propagate a bit more
  • 24fbb0f bugfix kgo: fix deadlock in Produce when using MaxBufferedBytes
  • 1827add bugfix kgo sink: fix read/write race for recBatch.canFailFromLoadErrs
  • d7ea2c3 bugfix fix setting lz4 compression levels (thanks @​asg0451!)
  • 5809dec optimise: use byteBuffer pool in decompression (thanks @​kalbhor!)
  • cda897d kgo: add log for preferred replicas
  • e62b402 improvement kgo sink: do not back off on certain edge case
  • 9e32bf9 kgo: ignore aborted txns if using READ_UNCOMMITTED

v1.17.0

Compare Source

===

This long-coming release, four months after v1.16.0, adds support for Kafka 3.7
and adds a few community added or requested APIs. There will be a kadm release
shortly following this one, and maybe a plugin release.

This adds full support for KIP-951, as well as protocol support for
KIP-919 (which has no client facing features) and KIP-848
(protocol only, not the feature!). KIP-951 should make the client faster at
handling when the broker moves partition leadership to a different broker.

There are two fairly minor bug fixes in the kgo package in this release, both
described below. There is also one bugfix in the pkg/sr independent (and
currently) untagged module. Because pkg/sr is untagged, the bugfix was released
a long time ago, but the relevant commit is still mentioned below.

Bug fixes

  • Previously, upgrading a consumer group from non-cooperative to cooperative
    while the group was running did not work. This is now fixed (by @​hamdanjaveed, thank you!).

  • Previously, if a cooperative consumer group member rebalanced while fetching
    offsets for partitions, if those partitions were not lost in the rebalance,
    the member would call OnPartitionsAssigned with those partitions again.
    Now, those partitions are passed to OnPartitionsAssigned only once (the first time).

Improvements

  • The client will now stop lingering if you hit max buffered records or bytes.
    Previously, if your linger was long enough, you could stall once you hit
    either of the Max options; that is no longer the case.

  • If you are issuing admin APIs on the same client you are using for consuming
    or producing, you may see fewer metadata requests being issued.

There are a few other even more minor improvements in the commit list if you
wish to go spelunking :).

Features

  • The Offset type now has a new method AtCommitted(), which causes the
    consumer to not fetch any partitions that do not have a previous commit.
    This mirrors Kafka's auto.offset.reset=none option.

  • KIP-951, linked above and the commit linked below, improves latency around
    partition leader transfers on brokers.

  • Client.GetConsumeTopics allows you to query what topics the client is
    currently consuming. This may be useful if you are consuming via regex.

  • Client.MarkCommitOffsets allows you to mark offsets to be committed in
    bulk, mirroring the non-mark API CommitOffsets.

Relevant commits

franz-go
  • a7caf20 feature kgo.Offset: add AtCommitted()
  • 55dc7a0 bugfix kgo: re-add fetch-canceled partitions AFTER the user callback
  • db24bbf improvement kgo: avoid / wakeup lingering if we hit max bytes or max records
  • 993544c improvement kgo: Optimistically cache mapped metadata when cluster metadata is periodically refreshed (thanks @​pracucci!)
  • 1ed02eb feature kgo: add support for KIP-951
  • 2fbbda5 bugfix fix: clear lastAssigned when revoking eager consumer
  • d9c1a41 pkg/kerr: add new errors
  • 54d3032 pkg/kversion: add 3.7
  • 892db71 pkg/sr bugfix sr SubjectVersions calls pathSubjectVersion
  • ed26ed0 feature kgo: adds Client.GetConsumeTopics (thanks @​UnaffiliatedCode!)
  • 929d564 feature kgo: adds Client.MarkCommitOffsets (thanks @​sudo-sturbia!)
kfake

kfake as well has a few improvements worth calling out:

  • 18e2cc3 kfake: support committing to non-existing groups
  • b05c3b9 kfake: support KIP-951, fix OffsetForLeaderEpoch
  • 5d8aa1c kfake: fix handling ListOffsets with requested timestamp

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/github.com-twmb-franz-go-1.x branch from fb5d0ce to 054058a Compare July 29, 2024 06:27
@renovate renovate bot changed the title Update module github.com/twmb/franz-go to v1.17.0 Update module github.com/twmb/franz-go to v1.17.1 Jul 29, 2024
Copy link
Contributor Author

renovate bot commented Jul 29, 2024

ℹ Artifact update notice

File name: pkg/kafkaclient/go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 6 additional dependencies were updated

Details:

Package Change
github.com/klauspost/compress v1.17.4 -> v1.17.8
github.com/pierrec/lz4/v4 v4.1.19 -> v4.1.21
github.com/twmb/franz-go/pkg/kmsg v1.7.0 -> v1.9.0
golang.org/x/crypto v0.17.0 -> v0.23.0
golang.org/x/net v0.17.0 -> v0.21.0
golang.org/x/text v0.14.0 -> v0.15.0

@renovate renovate bot force-pushed the renovate/github.com-twmb-franz-go-1.x branch from 054058a to 41cf43f Compare October 15, 2024 03:10
@renovate renovate bot changed the title Update module github.com/twmb/franz-go to v1.17.1 Update module github.com/twmb/franz-go to v1.18.0 Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

0 participants