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

KAFKA-13759: Disable idempotence by default in producers instantiated by Connect #11933

Conversation

kkonstantine
Copy link
Contributor

@kkonstantine kkonstantine commented Mar 23, 2022

With AK 3.0, idempotence was enabled by default in Kafka producers.

However, if idempotence is enabled, Connect won't be able to communicate via its producers with Kafka brokers older than version 0.11. Perhaps more importantly, for brokers older than version 2.8 the IDEMPOTENT_WRITE ACL is required to be granted to the principal of the Connect worker.

Therefore this commit disables producer idempotence by default to all the producers instantiated by Connect. Users can still choose to enable producer idempotence by explicitly setting the right worker and/or connector properties.

The changes were tested via existing unit, integration and system tests.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@kkonstantine kkonstantine force-pushed the KAFKA-13759-disable-producer-idempotency-by-default-in-Connect branch from f4ab563 to eccb9c0 Compare March 23, 2022 00:35
Copy link
Contributor

@rhauch rhauch left a comment

Choose a reason for hiding this comment

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

Thanks, @kkonstantine. A pretty minor wording suggestion below.

@kkonstantine kkonstantine marked this pull request as ready for review March 23, 2022 06:17
@kkonstantine
Copy link
Contributor Author

Thanks for the first review @rhauch
I have incorporated your feedback and have added a note in the upgrade notes. I'd appreciate a review on that text as well.

@kkonstantine kkonstantine changed the title KAFKA-13759: Disable idempotency by default in producers instantiated by Connect KAFKA-13759: Disable idempotence by default in producers instantiated by Connect Mar 23, 2022
@kkonstantine
Copy link
Contributor Author

Tests passed on the latest run with a couple of failures that don't seem relevant. Yet, because one failure was on SourceConnectorsIntegrationTest I'm rerunning these tests.

Copy link
Contributor

@rhauch rhauch left a comment

Choose a reason for hiding this comment

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

Just a few minor suggestions to wordsmith the comments and the Upgrade user documentation. Otherwise, LGTM.

docs/upgrade.html Outdated Show resolved Hide resolved
@kkonstantine
Copy link
Contributor Author

Thanks @rhauch. I've incorporated your suggestions in all places. The PR is ready for another pass

Copy link
Contributor

@rhauch rhauch left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks, @kkonstantine!

@kkonstantine kkonstantine merged commit 6ce6902 into apache:trunk Mar 23, 2022
@kkonstantine kkonstantine deleted the KAFKA-13759-disable-producer-idempotency-by-default-in-Connect branch March 23, 2022 22:03
kkonstantine added a commit that referenced this pull request Mar 23, 2022
… by Connect (#11933)

With AK 3.0, idempotence was enabled by default in Kafka producers. However, if idempotence is enabled, Connect won't be able to communicate via its producers with Kafka brokers older than version 0.11. Perhaps more importantly, for brokers older than version 2.8 the IDEMPOTENT_WRITE ACL is required to be granted to the principal of the Connect worker.

Therefore this commit disables producer idempotence by default to all the producers instantiated by Connect. Users can still choose to enable producer idempotence by explicitly setting the right worker and/or connector properties.

The changes were tested via existing unit, integration and system tests.

Reviewers: Randall Hauch <rhauch@gmail.com>
kkonstantine added a commit that referenced this pull request Mar 23, 2022
… by Connect (#11933)

With AK 3.0, idempotence was enabled by default in Kafka producers. However, if idempotence is enabled, Connect won't be able to communicate via its producers with Kafka brokers older than version 0.11. Perhaps more importantly, for brokers older than version 2.8 the IDEMPOTENT_WRITE ACL is required to be granted to the principal of the Connect worker.

Therefore this commit disables producer idempotence by default to all the producers instantiated by Connect. Users can still choose to enable producer idempotence by explicitly setting the right worker and/or connector properties.

The changes were tested via existing unit, integration and system tests.

Reviewers: Randall Hauch <rhauch@gmail.com>
kkonstantine added a commit that referenced this pull request Mar 23, 2022
… by Connect (#11933)

With AK 3.0, idempotence was enabled by default in Kafka producers. However, if idempotence is enabled, Connect won't be able to communicate via its producers with Kafka brokers older than version 0.11. Perhaps more importantly, for brokers older than version 2.8 the IDEMPOTENT_WRITE ACL is required to be granted to the principal of the Connect worker.

Therefore this commit disables producer idempotence by default to all the producers instantiated by Connect. Users can still choose to enable producer idempotence by explicitly setting the right worker and/or connector properties.

The changes were tested via existing unit, integration and system tests.

Reviewers: Randall Hauch <rhauch@gmail.com>
@kkonstantine
Copy link
Contributor Author

Thanks @rhauch. The fix has now been merged to trunk and cherry picked to 3.2, 3.1 and 3.0 with the appropriate adjustments to the upgrade notes. cc @cadonna @tombentley

jeffkbkim pushed a commit to confluentinc/kafka that referenced this pull request May 12, 2022
… by Connect (apache#11933)

With AK 3.0, idempotence was enabled by default in Kafka producers. However, if idempotence is enabled, Connect won't be able to communicate via its producers with Kafka brokers older than version 0.11. Perhaps more importantly, for brokers older than version 2.8 the IDEMPOTENT_WRITE ACL is required to be granted to the principal of the Connect worker.

Therefore this commit disables producer idempotence by default to all the producers instantiated by Connect. Users can still choose to enable producer idempotence by explicitly setting the right worker and/or connector properties.

The changes were tested via existing unit, integration and system tests.

Reviewers: Randall Hauch <rhauch@gmail.com>
jeffkbkim added a commit to confluentinc/kafka that referenced this pull request May 12, 2022
…cs-12-may-2022

* apache-kafka/3.0: (14 commits)
  fix: make sliding window works without grace period (#kafka-13739) (apache#11980)
  KAFKA-13794: Follow up to fix producer batch comparator (apache#12006)
  KAFKA-13794; Fix comparator of `inflightBatchesBySequence` in `TransactionManager` (apache#11991)
  KAFKA-13748: Do not include file stream connectors in Connect's CLASSPATH and plugin.path by default (apache#11908)
  KAFKA-13418: Support key updates with TLS 1.3 (apache#11966)
  KAFKA-13770: Restore compatibility with KafkaBasedLog using older Kafka brokers (apache#11946)
  KAFKA-13761: KafkaLog4jAppender deadlocks when idempotence is enabled (apache#11939)
  KAFKA-13759: Disable idempotence by default in producers instantiated by Connect (apache#11933)
  MINOR: Fix `ConsumerConfig.ISOLATION_LEVEL_DOC` (apache#11915)
  KAFKA-13750; Client Compatability KafkaTest uses invalid idempotency configs (apache#11909)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants