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

Disable the Kafka Connector graceful shutdown in dev mode #18945

Conversation

cescoffier
Copy link
Member

Also, propose an option to re-enable it.
The graceful shutdown waits until the inflight records have been processed and the offset committed to Kafka.
While this setting is highly recommended in production, in dev mode, it introduces slowness on shutdown.

@quarkus-bot
Copy link

quarkus-bot bot commented Jul 22, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 40fc224

Status Name Step Test failures Logs Raw logs
Initial JDK 11 Build Build ⚠️ Check → Logs Raw logs

@cescoffier cescoffier force-pushed the disable-kafka-graceful-shutdown-in-dev-mode branch from 40fc224 to e3880b0 Compare July 22, 2021 17:44

discoverDefaultSerdeConfig(discoveryState, defaultConfigProducer);
if (launchMode.getLaunchMode() == LaunchMode.DEVELOPMENT) {
Copy link
Member

Choose a reason for hiding this comment

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

What about test mode as well? Will this potentially add extra time at the end of test runs?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea. Should it be controlled by the same configuration property?

Right now it uses enableGracefulShutdownInDevMode, enableGracefulShutdownInDevAndTestMode is a bit long, but with autocompletion, it should not be a problem.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added.

@cescoffier cescoffier force-pushed the disable-kafka-graceful-shutdown-in-dev-mode branch from e3880b0 to 37804a3 Compare July 23, 2021 06:05
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 23, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 37804a3

Status Name Step Test failures Logs Raw logs
JVM Tests - JDK 11 Build Test failures Logs Raw logs
JVM Tests - JDK 16 Build Test failures Logs Raw logs

Full information is available in the Build summary check run.

Test Failures

⚙️ JVM Tests - JDK 11 #

📦 integration-tests/resteasy-reactive-kotlin/standard

io.quarkus.it.resteasy.reactive.kotlin.ReactiveClientTest.testGetCountryByName - More details - Source on GitHub

java.lang.RuntimeException: 
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.deployment.steps.ConfigGenerationBuildStep#generateConfigClass threw an exception: java.lang.IllegalStateException: More than one default value for mp.messaging.incoming.countries-t1-in.graceful-shutdown was produced
	at io.quarkus.deployment.steps.ConfigGenerationBuildStep.generateConfigClass(ConfigGenerationBuildStep.java:101)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:820)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at...

⚙️ JVM Tests - JDK 16 #

📦 integration-tests/resteasy-reactive-kotlin/standard

io.quarkus.it.resteasy.reactive.kotlin.ReactiveClientTest.testGetCountryByName - More details - Source on GitHub

java.lang.RuntimeException: 
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.deployment.steps.ConfigGenerationBuildStep#generateConfigClass threw an exception: java.lang.IllegalStateException: More than one default value for mp.messaging.incoming.countries-t1-in.graceful-shutdown was produced
	at io.quarkus.deployment.steps.ConfigGenerationBuildStep.generateConfigClass(ConfigGenerationBuildStep.java:101)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:820)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at...

@Ladicek
Copy link
Contributor

Ladicek commented Jul 23, 2021

Looks fine, barring the missing handling of @Channel injection points.

@cescoffier cescoffier force-pushed the disable-kafka-graceful-shutdown-in-dev-mode branch from 37804a3 to ae3a43f Compare July 23, 2021 08:45
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 23, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building ae3a43f

Status Name Step Test failures Logs Raw logs
JVM Tests - JDK 11 Build Test failures Logs Raw logs
JVM Tests - JDK 16 Build Test failures Logs Raw logs

Full information is available in the Build summary check run.

Test Failures

⚙️ JVM Tests - JDK 11 #

📦 integration-tests/resteasy-reactive-kotlin/standard

io.quarkus.it.resteasy.reactive.kotlin.ReactiveClientTest.testGetCountryByName - More details - Source on GitHub

java.lang.RuntimeException: 
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.deployment.steps.ConfigGenerationBuildStep#generateConfigClass threw an exception: java.lang.IllegalStateException: More than one default value for mp.messaging.incoming.countries-t1-in.graceful-shutdown was produced
	at io.quarkus.deployment.steps.ConfigGenerationBuildStep.generateConfigClass(ConfigGenerationBuildStep.java:101)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:820)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at...

⚙️ JVM Tests - JDK 16 #

📦 integration-tests/resteasy-reactive-kotlin/standard

io.quarkus.it.resteasy.reactive.kotlin.ReactiveClientTest.testGetCountryByName - More details - Source on GitHub

java.lang.RuntimeException: 
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.deployment.steps.ConfigGenerationBuildStep#generateConfigClass threw an exception: java.lang.IllegalStateException: More than one default value for mp.messaging.incoming.countries-t1-in.graceful-shutdown was produced
	at io.quarkus.deployment.steps.ConfigGenerationBuildStep.generateConfigClass(ConfigGenerationBuildStep.java:101)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:820)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at...

@cescoffier cescoffier force-pushed the disable-kafka-graceful-shutdown-in-dev-mode branch from ae3a43f to d070c46 Compare July 23, 2021 13:49
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 23, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building d070c46

Status Name Step Test failures Logs Raw logs
JVM Tests - JDK 11 Build Test failures Logs Raw logs
JVM Tests - JDK 16 Build Test failures Logs Raw logs

Full information is available in the Build summary check run.

Test Failures

⚙️ JVM Tests - JDK 11 #

📦 integration-tests/resteasy-reactive-kotlin/standard

io.quarkus.it.resteasy.reactive.kotlin.ReactiveClientTest.testGetCountryByName - More details - Source on GitHub

java.lang.RuntimeException: 
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.deployment.steps.ConfigGenerationBuildStep#generateConfigClass threw an exception: java.lang.IllegalStateException: More than one default value for mp.messaging.incoming.countries-t1-in.graceful-shutdown was produced
	at io.quarkus.deployment.steps.ConfigGenerationBuildStep.generateConfigClass(ConfigGenerationBuildStep.java:101)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:820)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at...

⚙️ JVM Tests - JDK 16 #

📦 integration-tests/resteasy-reactive-kotlin/standard

io.quarkus.it.resteasy.reactive.kotlin.ReactiveClientTest.testGetCountryByName - More details - Source on GitHub

java.lang.RuntimeException: 
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.deployment.steps.ConfigGenerationBuildStep#generateConfigClass threw an exception: java.lang.IllegalStateException: More than one default value for mp.messaging.incoming.countries-t1-in.graceful-shutdown was produced
	at io.quarkus.deployment.steps.ConfigGenerationBuildStep.generateConfigClass(ConfigGenerationBuildStep.java:101)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:820)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at...

Also, propose an option to re-enable it.
The graceful shutdown waits until the inflight records have been processed and the offset committed to Kafka.
While this setting is highly recommended in production, in dev and test modes, it introduces slowness on shutdown.
@cescoffier cescoffier force-pushed the disable-kafka-graceful-shutdown-in-dev-mode branch from d070c46 to 22bba29 Compare July 23, 2021 14:54
@stuartwdouglas stuartwdouglas merged commit 0d70cba into quarkusio:main Jul 24, 2021
@quarkus-bot quarkus-bot bot added this to the 2.2 - main milestone Jul 24, 2021
@cescoffier cescoffier deleted the disable-kafka-graceful-shutdown-in-dev-mode branch August 1, 2021 07:31
@gsmet gsmet modified the milestones: 2.2 - main, 2.1.1.Final Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants