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-12574: KIP-732, Deprecate eos-alpha and replace eos-beta with eos-v2 #10573

Conversation

ableegoldman
Copy link
Contributor

Deprecates and logs a warning upon usage of the following:

  • StreamsConfig.EXACTLY_ONCE
  • StreamsConfig.EXACTLY_ONCE_BETA
  • Producer#sendOffsetsToTransaction(Map offsets, String consumerGroupId)

The deprecated eos configs are to be replaced by the new StreamsConfig.EXACTLY_ONCE_V2 config. Additionally, this PR replaces usages of the term "eos-beta" throughout the code with the term "eos-v2"

docs/streams/core-concepts.html Outdated Show resolved Hide resolved
docs/streams/developer-guide/config-streams.html Outdated Show resolved Hide resolved
docs/streams/developer-guide/config-streams.html Outdated Show resolved Hide resolved
docs/streams/upgrade-guide.html Outdated Show resolved Hide resolved
docs/streams/upgrade-guide.html Outdated Show resolved Hide resolved
docs/streams/upgrade-guide.html Outdated Show resolved Hide resolved
docs/streams/upgrade-guide.html Outdated Show resolved Hide resolved
@ableegoldman
Copy link
Contributor Author

@mjsax thanks for the review, addressed your comments please give it another pass

@ableegoldman ableegoldman force-pushed the 12574-deprecate-eos-configs-and-sendOffsetsToTransaction branch from 9a2013f to 49a33f6 Compare April 24, 2021 01:12
…precate-eos-configs-and-sendOffsetsToTransaction
Copy link
Member

@mjsax mjsax left a comment

Choose a reason for hiding this comment

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

Tried to answer the open questions. Feel free to merge after addressed.

@ableegoldman
Copy link
Contributor Author

Tons of flaky test failures, all unrelated. Mostly Connect and Raft, a few Streams tests that are known to be flaky which I left some thoughts on the ticket for. Going to merge

@ableegoldman ableegoldman merged commit 3805f37 into apache:trunk Apr 28, 2021
@ableegoldman
Copy link
Contributor Author

Merged to trunk

@@ -525,6 +525,11 @@ private TransactionManager configureTransactionState(ProducerConfig config,
final int transactionTimeoutMs = config.getInt(ProducerConfig.TRANSACTION_TIMEOUT_CONFIG);
final long retryBackoffMs = config.getLong(ProducerConfig.RETRY_BACKOFF_MS_CONFIG);
final boolean autoDowngradeTxnCommit = config.getBoolean(ProducerConfig.AUTO_DOWNGRADE_TXN_COMMIT);
// Only log a warning if being used outside of Streams, which we know includes "StreamThread-" in the client id
if (autoDowngradeTxnCommit && !clientId.contains("StreamThread-")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should not have Streams specific code in the producer.

Copy link
Member

Choose a reason for hiding this comment

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

In general I agree, however given that we intend to remove it in 4.0 (that should not be too long out), it seems acceptable? If you feel strong about it, any proposal how to avoid it?

Copy link
Contributor

Choose a reason for hiding this comment

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

4.0 is probably 18 months away, that's a reasonably long time. Why do we need to log a warning only if it's not Streams?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ijuma I came across this after the question was raised around the autodowngrade logic, apparently (according to the config's javadocs) it's an "internal" config that's only used for Streams. The config itself is package-private.

Given that, I thought we may want to log a warning to any plain client users that saw this config and didn't notice that it was internal, and thus tried to use it. But I'm happy to do a followup PR to remove this. Alternatively, we can just take this config out -- I actually don't see any reason why it should be necessary, AFAICT it's just a slight convenience config that saves Streams from the ~5 lines of code it would take to do this downgrade itself (basically it just erases the extra consumer group metadata that isn't understood by older brokers). Not sure if this was vestigial from an older iteration of KIP-447, as it seems rather unnecessary..

Copy link
Contributor

Choose a reason for hiding this comment

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

@ableegoldman Your suggestion to remove the config altogether seems best to me. We don't have a grace period for internal configs, that's why they're internal. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done #10675

@@ -179,10 +179,18 @@ public void beginTransaction() throws ProducerFencedException {
this.sentOffsets = false;
}

@SuppressWarnings("deprecation")
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this have a deprecated annotation instead of the warning suppression?

Copy link
Member

Choose a reason for hiding this comment

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

Would be better I guess. But doesn't it inherit the @Deprecated annotation automatically?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess it doesn't need to have either, I can remove in a followup PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually no, we do get a warning if we don't have either annotation. I'll change it to @Deprecated then

ableegoldman pushed a commit that referenced this pull request May 17, 2021
…#10675)

Minor followup to #10573. Removes this internal Producer config which was only ever used to avoid a very minor amount of work to downgrade the consumer group metadata in the txn commit request in Kafka Streams

Reviewers: Ismael Juma <[email protected]>, Matthias J. Sax <[email protected]>, Guozhang Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants