Skip to content

Commit

Permalink
Fix 100% CPU usage with DependentAdminClient (#1949)
Browse files Browse the repository at this point in the history
* Add default value of cancellationDelayMaxMs for DependantAdminClient

* Update CHANGELOG

* Use ExtractCancellationDelayMaxMs instead of hardcoding
  • Loading branch information
anchitj authored Nov 29, 2022
1 parent 245f94c commit 9afe648
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
## Fixes

- During a group rebalance, partitions are now always revoked as a side effect of a call to Consume, whether or not a partitions revoked handler has been specified. Previously, if no handler was specified, the timing of when the consumer lost ownership of partitions during a rebalance was arbitrarily, frequently resulting in an erroneous state exception when committing or storing offsets.
- Fixed 100% CPU usage with `DependentAdminClientBuilder`.


# 1.9.4
Expand Down
3 changes: 2 additions & 1 deletion src/Confluent.Kafka/AdminClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,8 @@ private SafeKafkaHandle kafkaHandle
/// or AdminClient handle.
/// </param>
internal AdminClient(Handle handle)
{
{
Config.ExtractCancellationDelayMaxMs(new AdminClientConfig(), out this.cancellationDelayMaxMs);
this.ownedClient = null;
this.handle = handle;
Init();
Expand Down

0 comments on commit 9afe648

Please sign in to comment.