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 Kafka to 2.7.0 #14732

Merged
merged 4 commits into from
Mar 14, 2021
Merged

Update Kafka to 2.7.0 #14732

merged 4 commits into from
Mar 14, 2021

Conversation

cescoffier
Copy link
Member

PR based on #14706 but extend the Kafka Streams Processor to register the Task Assignors implementation.

@ghost ghost added area/dependencies Pull requests that update a dependency file area/kafka-streams labels Feb 1, 2021
@cescoffier cescoffier linked an issue Feb 1, 2021 that may be closed by this pull request
Copy link
Contributor

@gunnarmorling gunnarmorling left a comment

Choose a reason for hiding this comment

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

LGTM, but let's go for 2.6.1. 2.7.0 is out too, but I think waiting for a bugfix micro isn't a bad idea.

@cescoffier cescoffier changed the title Update Kafka to 2.6.0 Update Kafka to 2.6.1 Feb 1, 2021
@gsmet
Copy link
Member

gsmet commented Feb 2, 2021

Hmmmm. There's something not working very on Windows in Kafka Streams:

Caused by: java.lang.UnsupportedOperationException
61789
	at java.base/java.nio.file.Files.setPosixFilePermissions(Files.java:2079)
61790
	at org.apache.kafka.streams.processor.internals.StateDirectory.<init>(StateDirectory.java:115)
61791
	at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:745)
61792
	at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:657)
61793
	at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:567)
61794
	at io.quarkus.kafka.streams.runtime.KafkaStreamsProducer.initializeKafkaStreams(KafkaStreamsProducer.java:144)
61795
	at io.quarkus.kafka.streams.runtime.KafkaStreamsProducer.<init>(KafkaStreamsProducer.java:95)
61796
	at io.quarkus.kafka.streams.runtime.KafkaStreamsProducer_Bean.create(KafkaStreamsProducer_Bean.zig:742)
61797
	at io.quarkus.kafka.streams.runtime.KafkaStreamsProducer_Bean.create(KafkaStreamsProducer_Bean.zig:762)
61798
	at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:96)
61799
	at io.quarkus.arc.impl.AbstractSharedContext.access$000(AbstractSharedContext.java:14)
61800
	at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
61801
	at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
61802
	at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
61803
	at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
61804
	at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26)
61805
	at io.quarkus.kafka.streams.runtime.KafkaStreamsProducer_Bean.get(KafkaStreamsProducer_Bean.zig:794)
61806
	at io.quarkus.kafka.streams.runtime.KafkaStreamsProducer_Bean.get(KafkaStreamsProducer_Bean.zig:810)

@cescoffier cescoffier changed the title Update Kafka to 2.6.1 Update Kafka to 2.7.0 Feb 2, 2021
@cescoffier
Copy link
Member Author

trying with 2.7.0. If it does not work, I will revert to 2.6.0 which was passing all the tests.

Looking at the release notes, I can't see why there is new Windows file system issues.
We need 2.6+ to avoid the high load on rebalance.

@gunnarmorling
Copy link
Contributor

The Windows issue is this regression https://issues.apache.org/jira/browse/KAFKA-12190 (in both 2.7.0 and 2.6.1). Seems we're between a rock and a hard place here.

@cescoffier
Copy link
Member Author

Damned, I didn't see it... So, revert to 2.6.0, until we can bump?

@cescoffier cescoffier changed the title Update Kafka to 2.7.0 Update Kafka to 2.6.0 Feb 2, 2021
@cescoffier
Copy link
Member Author

Back to 2.6.0

@gunnarmorling
Copy link
Contributor

Hum, hum. I think the CPU issue actually has more far-fetching consequences than the state store things for Kafka Streams on Windows. But it s$cks either way.

@gsmet
Copy link
Member

gsmet commented Feb 2, 2021

Another option would be to upgrade and skip the tests on Windows until the issue is fixed.

@gunnarmorling
Copy link
Contributor

gunnarmorling commented Feb 2, 2021 via email

@gsmet
Copy link
Member

gsmet commented Feb 2, 2021

OK, let me work on that, I need an easy one before going to PTO.

@gsmet gsmet changed the title Update Kafka to 2.6.0 Update Kafka to 2.7.0 Feb 2, 2021
@gsmet
Copy link
Member

gsmet commented Feb 2, 2021

I pushed an update to Kafka 2.7.0, let's see how it goes.

@cescoffier
Copy link
Member Author

Don't you fear that users won't be able to develop on their windows box because of this?

@gunnarmorling
Copy link
Contributor

Don't you fear that users won't be able to develop on their windows box because of this?

Yes, that is a concern for sure, and perhaps it's not the right thing. Here's my rationale:

  • This only affects Kafka Streams users (i.e. a subset of all Kafka users)
  • The issue is very apparent, you should be able to find out about it during testing and then can mitigate it by downgrading to 2.5
  • The CPU issue on the other hand potentially affects every Kafka users, and it has bigger odds that you only notice it in prod, when it's too late

Hence my inclination to accept that Kafka Streams issue. A third alternative would be sitting it out and waiting for 2.6.2 perhaps?

@cescoffier
Copy link
Member Author

Yes, updating to 2.6.2 as soon as it's available will be the right thing to do.
I'm ok with explaining the issue to windows users for now, as it's temporary.

@cescoffier
Copy link
Member Author

cescoffier commented Feb 3, 2021

@gsmet Look like 2.7.0 requires a Scala bump/adjustement...

2021-02-02T14:10:49.4875189Z 2021-02-02 14:09:51,710 ERROR [io.qua.ver.htt.dep.dev.HttpRemoteDevClient] (Remote dev client thread) Remote dev request failed: java.lang.NoClassDefFoundError: scala/math/Ordering$$anon$4

@gsmet
Copy link
Member

gsmet commented Feb 3, 2021

Hmmm, that's weird. I bumped Scala and it was working locally. I'll have a closer look.

@gsmet
Copy link
Member

gsmet commented Feb 3, 2021

OK, so AFAICS, Debezium is still incompatible with Scala 2.13:

Caused by: java.lang.InstantiationError: scala.collection.mutable.ArraySeq
	at io.debezium.kafka.KafkaServer.startup(KafkaServer.java:218)
	at java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4707)
	at io.debezium.kafka.KafkaCluster.startup(KafkaCluster.java:250)
	at io.quarkus.it.kafka.KafkaTestResource.start(KafkaTestResource.java:28)
	at io.quarkus.test.common.TestResourceManager.lambda$start$1(TestResourceManager.java:95)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

so we will have to keep 2.12 for now.

I have a branch ready for the upgrade to 2.13.

@gsmet
Copy link
Member

gsmet commented Feb 4, 2021

OK, the Scala Maven plugin situation is not very good and fixing the properties ends up breaking the codestarts. I reintroduced the duplicated property for now as I have no idea if we can break the compatibility on this.

@cescoffier
Copy link
Member Author

@gsmet looks ok now (restarted the CI because of an unrelated transient network issue)

@cescoffier
Copy link
Member Author

ping @gsmet ?

Base automatically changed from master to main March 12, 2021 15:55
@gwenneg
Copy link
Member

gwenneg commented Mar 14, 2021

Any news about this update? We (the Insights team) would like to use the PEM file support for private keys that comes with Kafka 2.7.0.

@gsmet
Copy link
Member

gsmet commented Mar 14, 2021

I wasn't sure people wanted an upgrade to a .0 of Kafka, that's why I didn't push for it. I'm rebasing the PR and will push soon.

@gsmet gsmet added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Mar 14, 2021
@gsmet gsmet merged commit 203bfca into quarkusio:main Mar 14, 2021
@quarkus-bot quarkus-bot bot added this to the 1.13 - master milestone Mar 14, 2021
@gwenneg
Copy link
Member

gwenneg commented Mar 14, 2021

Well I dont know much about which Kafka version should be used or not, but the previous version was also a .0 so I suppose this update is ok. Thanks @gsmet!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/codestarts area/dependencies Pull requests that update a dependency file area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/kafka-streams area/platform Issues related to definition and interaction with Quarkus Platform area/scala release/noteworthy-feature triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kafka consumer consumes all CPU when shutting down the broker
5 participants