Skip to content

HOTFIX: null check for ProducerRecord when computing sizeInBytes#12288

Merged
ableegoldman merged 8 commits intoapache:trunkfrom
ableegoldman:HOTFIX-add-null-check-for-ProducerRecord-key
Jun 14, 2022
Merged

HOTFIX: null check for ProducerRecord when computing sizeInBytes#12288
ableegoldman merged 8 commits intoapache:trunkfrom
ableegoldman:HOTFIX-add-null-check-for-ProducerRecord-key

Conversation

@ableegoldman
Copy link
Member

Minor followup to #12235 that adds a null check on the record key in the new ClientUtils#producerRecordSizeInBytes utility method, as there are valid cases in which we might be sending records with null keys to the Producer, such as a simple builder.stream("non-keyed-input-topic").filter(...).to("output-topic")

@ableegoldman ableegoldman requested a review from bbejeck June 13, 2022 22:07
Copy link
Member

@bbejeck bbejeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ableegoldman
Copy link
Member Author

Failing tests are unrelated:
testIncrementalAlterConfigs() – kafka.server.KRaftClusterTest
testFailureToFenceEpoch(String).quorum=kraft – kafka.api.TransactionsTest

Merging this fix

@ableegoldman ableegoldman merged commit 3189a86 into apache:trunk Jun 14, 2022
ableegoldman added a commit to confluentinc/kafka that referenced this pull request Jun 14, 2022
CONFLUENT: Sync from apache/kafka trunk to confluentinc/kafka master (13 Jun 2022)

apache/trunk: (7 commits)
KAFKA-13891: reset generation when syncgroup failed with REBALANCE_IN…(apache#12140)
KAFKA-10000: Exactly-once source tasks (apache#11780)
KAFKA-13436: Omitted BrokerTopicMetrics metrics in the documentation (apache#11473)
MINOR: Use Exit.addShutdownHook instead of directly adding hooks to R…(apache#12283)
KAFKA-13846: Adding overloaded metricOrElseCreate method (apache#12121)
KAFKA-13935 Fix static usages of IBP in KRaft mode (apache#12250)
HOTFIX: null check keys of ProducerRecord when computing sizeInBytes (apache#12288)


Conflicts:
None
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.

3 participants