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

Support cancelling in flight REST requests #41990

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Jul 19, 2024

@calebkiage
Copy link

Upon testing, I get the exception:

stack trace ``` Exception in thread "vert.x-eventloop-thread-0" kotlinx.coroutines.CompletionHandlerException: Exception in invokeOnCancellation handler for CancellableContinuation(DispatchedContinuation[VertxDispatcher@48ac8e1c, Continuation at org.example.CallCancelResource$cancel2$2$1.invokeSuspend(ExampleResource.kt:79)@117a641f]){Cancelled}@4711d835 at kotlinx.coroutines.CancellableContinuationImpl.callCancelHandler(CancellableContinuationImpl.kt:701) at kotlinx.coroutines.CancellableContinuationImpl.invokeOnCancellationImpl(CancellableContinuationImpl.kt:420) at kotlinx.coroutines.CancellableContinuationImpl.invokeOnCancellationInternal$kotlinx_coroutines_core(CancellableContinuationImpl.kt:395) at kotlinx.coroutines.CancellableContinuationKt.invokeOnCancellation(CancellableContinuation.kt:208) at kotlinx.coroutines.CancellableContinuationImpl.invokeOnCancellation(CancellableContinuationImpl.kt:393) at io.smallrye.mutiny.coroutines.UniKt.awaitSuspending(Uni.kt:37) at org.example.HelloClient$$QuarkusRestClientInterface.longRunning(Unknown Source) at org.example.HelloClient$$CDIWrapper.longRunning(Unknown Source) at org.example.HelloClient$$CDIWrapper_ClientProxy.longRunning(Unknown Source) at org.example.CallCancelResource$cancel2$2$1.invokeSuspend(ExampleResource.kt:79) at org.example.CallCancelResource$cancel2$2$1.invoke(ExampleResource.kt) at org.example.CallCancelResource$cancel2$2$1.invoke(ExampleResource.kt) at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturnIgnoreTimeout(Undispatched.kt:72) at kotlinx.coroutines.TimeoutKt.setupTimeout(Timeout.kt:148) at kotlinx.coroutines.TimeoutKt.withTimeoutOrNull(Timeout.kt:104) at org.example.CallCancelResource$cancel2$2.invokeSuspend(ExampleResource.kt:78) at org.example.CallCancelResource$cancel2$2.invoke(ExampleResource.kt) at org.example.CallCancelResource$cancel2$2.invoke(ExampleResource.kt) at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:61) at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:261) at org.example.CallCancelResource.cancel2$suspendImpl(ExampleResource.kt:75) at org.example.CallCancelResource.cancel2(ExampleResource.kt) at org.example.CallCancelResource$quarkuscoroutineinvoker$cancel2_e48d88832a4405f583c35a3f01a15c39b2d4d137.invokeCoroutine(Unknown Source) at org.jboss.resteasy.reactive.server.runtime.kotlin.CoroutineInvocationHandler$handle$job$1.invokeSuspend(CoroutineInvocationHandler.kt:48) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) at org.jboss.resteasy.reactive.server.runtime.kotlin.VertxDispatcher.dispatch$lambda$0(ApplicationCoroutineScope.kt:45) at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:279) at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:261) at io.vertx.core.impl.ContextInternal.lambda$runOnContext$0(ContextInternal.java:59) at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:840) Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [TimeoutCoroutine(timeMillis=10){Cancelling}@631ffae5, VertxDispatcher@48ac8e1c] Caused by: java.lang.NullPointerException: Cannot invoke "io.vertx.core.http.HttpClientRequest.reset()" because the return value of "org.jboss.resteasy.reactive.client.impl.RestClientRequestContext.getHttpClientRequest()" is null at org.jboss.resteasy.reactive.client.impl.UniInvoker$1.run(UniInvoker.java:49) at io.smallrye.context.impl.wrappers.SlowContextualRunnable.run(SlowContextualRunnable.java:19) at io.smallrye.mutiny.operators.uni.UniOnCancellation$UniOnCancellationProcessor.cancel(UniOnCancellation.java:64) at io.smallrye.mutiny.helpers.UniCallbackSubscriber.cancel(UniCallbackSubscriber.java:83) at io.smallrye.mutiny.coroutines.UniKt$awaitSuspending$2$3$1.invoke(Uni.kt:37) at io.smallrye.mutiny.coroutines.UniKt$awaitSuspending$2$3$1.invoke(Uni.kt:37) at kotlinx.coroutines.CancelHandler$UserSupplied.invoke(CancellableContinuationImpl.kt:660) at kotlinx.coroutines.CancellableContinuationImpl.callCancelHandler(CancellableContinuationImpl.kt:245) ... 37 more ```

I also noticed an intermittent exception in Vert.x when reset is used. It doesn't check if the request exists before popping from the requests double ended queue in io.vertx.core.http.impl.Http1xClientConnection:

stack trace
Uncaught exception received by Vert.x: java.util.NoSuchElementException
	at java.base/java.util.ArrayDeque.removeFirst(ArrayDeque.java:362)
	at java.base/java.util.ArrayDeque.pop(ArrayDeque.java:593)
	at io.vertx.core.http.impl.Http1xClientConnection.endRequest(Http1xClientConnection.java:290)
	at io.vertx.core.http.impl.Http1xClientConnection.beginRequest(Http1xClientConnection.java:251)
	at io.vertx.core.http.impl.Http1xClientConnection.access$800(Http1xClientConnection.java:74)
	at io.vertx.core.http.impl.Http1xClientConnection$StreamImpl.writeHead(Http1xClientConnection.java:541)
	at io.vertx.core.http.impl.Http1xClientConnection$StreamImpl.writeHead(Http1xClientConnection.java:526)
	at io.vertx.core.http.impl.HttpClientRequestImpl.doWrite(HttpClientRequestImpl.java:522)
	at io.vertx.core.http.impl.HttpClientRequestImpl.write(HttpClientRequestImpl.java:492)
	at io.vertx.core.http.impl.HttpClientRequestImpl.end(HttpClientRequestImpl.java:438)
	at io.vertx.core.http.impl.HttpClientRequestImpl.end(HttpClientRequestImpl.java:432)
	at io.vertx.core.http.HttpClientRequest.send(HttpClientRequest.java:400)
	at org.example.CallCancelResource$cancel1$2$1$1$1.handle(ExampleResource.kt:50)
	at org.example.CallCancelResource$cancel1$2$1$1$1.handle(ExampleResource.kt:43)
	at io.vertx.core.impl.future.FutureImpl$4.onSuccess(FutureImpl.java:176)
	at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:66)
	at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:259)
	at io.vertx.core.http.impl.HttpClientImpl.lambda$null$3(HttpClientImpl.java:392)
	at io.vertx.core.impl.future.FutureImpl$4.onSuccess(FutureImpl.java:176)
	at io.vertx.core.impl.future.FutureBase.lambda$emitSuccess$0(FutureBase.java:60)
	at io.vertx.core.impl.ContextImpl.execute(ContextImpl.java:298)
	at io.vertx.core.impl.DuplicatedContext.execute(DuplicatedContext.java:169)
	at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:57)
	at io.vertx.core.impl.future.FutureImpl.addListener(FutureImpl.java:231)
	at io.vertx.core.impl.future.FutureImpl.onComplete(FutureImpl.java:199)
	at io.vertx.core.http.impl.Http1xClientConnection.createStream(Http1xClientConnection.java:1269)
	at io.vertx.core.http.impl.HttpClientImpl.lambda$doRequest$4(HttpClientImpl.java:372)
	at io.vertx.core.net.impl.pool.Endpoint.lambda$getConnection$0(Endpoint.java:52)
	at io.vertx.core.http.impl.SharedClientHttpStreamEndpoint$Request.handle(SharedClientHttpStreamEndpoint.java:162)
	at io.vertx.core.http.impl.SharedClientHttpStreamEndpoint$Request.handle(SharedClientHttpStreamEndpoint.java:123)
	at io.vertx.core.impl.ContextImpl.emit(ContextImpl.java:328)
	at io.vertx.core.impl.ContextImpl.emit(ContextImpl.java:321)
	at io.vertx.core.net.impl.pool.SimpleConnectionPool$LeaseImpl.emit(SimpleConnectionPool.java:714)
	at io.vertx.core.net.impl.pool.SimpleConnectionPool$ConnectSuccess$2.run(SimpleConnectionPool.java:337)
	at io.vertx.core.net.impl.pool.Task.runNextTasks(Task.java:43)
	at io.vertx.core.net.impl.pool.CombinerExecutor.submit(CombinerExecutor.java:91)
	at io.vertx.core.net.impl.pool.SimpleConnectionPool.execute(SimpleConnectionPool.java:244)
	at io.vertx.core.net.impl.pool.SimpleConnectionPool.lambda$connect$2(SimpleConnectionPool.java:256)
	at io.vertx.core.http.impl.SharedClientHttpStreamEndpoint.lambda$connect$2(SharedClientHttpStreamEndpoint.java:102)
	at io.vertx.core.impl.future.FutureImpl$4.onSuccess(FutureImpl.java:176)
	at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:66)
	at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:259)
	at io.vertx.core.impl.future.Composition$1.onSuccess(Composition.java:62)
	at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:66)
	at io.vertx.core.impl.future.FutureImpl.addListener(FutureImpl.java:231)
	at io.vertx.core.impl.future.Composition.onSuccess(Composition.java:43)
	at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:66)
	at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:259)
	at io.vertx.core.Promise.complete(Promise.java:66)
	at io.vertx.core.net.impl.NetClientImpl.lambda$connected$9(NetClientImpl.java:343)
	at io.vertx.core.net.impl.VertxHandler.setConnection(VertxHandler.java:82)
	at io.vertx.core.net.impl.VertxHandler.handlerAdded(VertxHandler.java:88)
	at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:1130)
	at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:608)
	at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:222)
	at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:194)
	at io.vertx.core.net.impl.NetClientImpl.connected(NetClientImpl.java:345)
	at io.vertx.core.net.impl.NetClientImpl.lambda$connectInternal2$3(NetClientImpl.java:307)
	at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:279)
	at io.vertx.core.net.impl.ChannelProvider.connected(ChannelProvider.java:172)
	at io.vertx.core.net.impl.ChannelProvider.lambda$handleConnect$0(ChannelProvider.java:155)
	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:590)
	at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:583)
	at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:559)
	at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:492)
	at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:636)
	at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:625)
	at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:105)
	at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:84)
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:305)
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:840)

@geoand
Copy link
Contributor Author

geoand commented Jul 19, 2024

Nice :(

Thanks a lot for checking!

@cescoffier this seems like a Vert.x bug

@calebkiage
Copy link

I have a project for easy testing set up at https://github.com/calebkiage/quarkus-kotlin-cancellation-test that you can use as well for quick tests.

@cescoffier
Copy link
Member

Yes, that looks like a vert.x bug. @calebkiage can you open an issue in https://github.com/eclipse-vertx/vert.x

@calebkiage
Copy link

It looks like the vertx bug was fixed.

@geoand geoand changed the title WIP - Support cancelling in flight REST requests Support cancelling in flight REST requests Feb 19, 2025
@geoand
Copy link
Contributor Author

geoand commented Feb 19, 2025

I have rebased the PR onto main. Would you like to try it out?

@calebkiage
Copy link

calebkiage commented Feb 19, 2025

It seems to be working now

stack trace

2025-02-20 01:57:52,920 INFO [org.exa.CallCancelResource] (vert.x-eventloop-thread-1) calling /long/a with timeout 10 ms
2025-02-20 01:57:52,923 INFO [org.exa.ExampleResource] (vert.x-eventloop-thread-0) /long/a: starting
2025-02-20 01:57:52,944 INFO [org.exa.ExampleResource] (vert.x-eventloop-thread-0) /long/a: canceling

however, there's an exception that is printed in some instances after a quarkusDev restart:

stack trace
 Exception in thread "vert.x-eventloop-thread-1" kotlinx.coroutines.CompletionHandlerException: Exception in invokeOnCancellation handler for CancellableContinuation(DispatchedContinuation[VertxDispatcher@24855e1f, Continuation at org.example.CallCancelResource$cancel2$2.invokeSuspend(ExampleResource.kt:73)@4235c618]){Cancelled}@1919690a
    at kotlinx.coroutines.CancellableContinuationImpl.callCancelHandler(CancellableContinuationImpl.kt:711)
    at kotlinx.coroutines.CancellableContinuationImpl.invokeOnCancellationImpl(CancellableContinuationImpl.kt:423)
    at kotlinx.coroutines.CancellableContinuationImpl.invokeOnCancellationInternal$kotlinx_coroutines_core(CancellableContinuationImpl.kt:398)
    at kotlinx.coroutines.CancellableContinuationKt.invokeOnCancellation(CancellableContinuation.kt:239)
    at kotlinx.coroutines.CancellableContinuationImpl.invokeOnCancellation(CancellableContinuationImpl.kt:396)
    at io.smallrye.mutiny.coroutines.UniKt.awaitSuspending(Uni.kt:37)
    at org.example.HelloClient$$QuarkusRestClientInterface.longRunning(Unknown Source)
    at org.example.HelloClient$$CDIWrapper.longRunning(Unknown Source)
    at org.example.HelloClient$$CDIWrapper_ClientProxy.longRunning(Unknown Source)
    at org.example.CallCancelResource$cancel2$2.invokeSuspend(ExampleResource.kt:73)
    at org.example.CallCancelResource$cancel2$2.invoke(ExampleResource.kt)
    at org.example.CallCancelResource$cancel2$2.invoke(ExampleResource.kt)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturnIgnoreTimeout(Undispatched.kt:53)
    at kotlinx.coroutines.TimeoutKt.setupTimeout(Timeout.kt:148)
    at kotlinx.coroutines.TimeoutKt.withTimeout(Timeout.kt:43)
    at org.example.CallCancelResource.cancel2(ExampleResource.kt:72)
    at org.example.CallCancelResource$quarkuscoroutineinvoker$cancel2_e48d88832a4405f583c35a3f01a15c39b2d4d137.invokeCoroutine(Unknown Source)
    at org.jboss.resteasy.reactive.server.runtime.kotlin.CoroutineInvocationHandler$handle$job$1.invokeSuspend(CoroutineInvocationHandler.kt:48)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
    at org.jboss.resteasy.reactive.server.runtime.kotlin.VertxDispatcher.dispatch$lambda$0(ApplicationCoroutineScope.kt:45)
    at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:270)
    at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:252)
    at io.vertx.core.impl.ContextInternal.lambda$runOnContext$0(ContextInternal.java:50)
    at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:998)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Thread.java:1583)
    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [TimeoutCoroutine(timeMillis=10){Cancelling}@676074d9, VertxDispatcher@24855e1f]

Caused by: java.lang.NullPointerException: Cannot invoke "io.vertx.core.http.HttpClientRequest.reset()" because the return value of "org.jboss.resteasy.reactive.client.impl.RestClientRequestContext.getHttpClientRequest()" is null
at org.jboss.resteasy.reactive.client.impl.UniInvoker$1.run(UniInvoker.java:49)
at io.smallrye.context.impl.wrappers.SlowContextualRunnable.run(SlowContextualRunnable.java:19)
at io.smallrye.mutiny.operators.uni.UniOnCancellation$UniOnCancellationProcessor.cancel(UniOnCancellation.java:64)
at io.smallrye.mutiny.helpers.UniCallbackSubscriber.cancel(UniCallbackSubscriber.java:83)
at io.smallrye.mutiny.coroutines.UniKt$awaitSuspending$2$3$1.invoke(Uni.kt:37)
at io.smallrye.mutiny.coroutines.UniKt$awaitSuspending$2$3$1.invoke(Uni.kt:37)
at kotlinx.coroutines.CancelHandler$UserSupplied.invoke(CancellableContinuationImpl.kt:667)
at kotlinx.coroutines.CancellableContinuationImpl.callCancelHandler(CancellableContinuationImpl.kt:239)
... 31 more

@geoand geoand marked this pull request as ready for review February 20, 2025 05:37
@geoand geoand requested a review from cescoffier February 20, 2025 05:37

This comment has been minimized.

@geoand
Copy link
Contributor Author

geoand commented Feb 20, 2025

The latest update to the PR should fix that issue as well

Copy link

quarkus-bot bot commented Feb 20, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit df4da57.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

@calebkiage
Copy link

calebkiage commented Feb 20, 2025

Thanks. The exception isn't thrown anymore, but it looks like the first cancellation doesn't work.

stack trace
2025-02-20 13:51:08,165 INFO  [org.exa.CallCancelResource] (vert.x-eventloop-thread-0) calling /long/a with timeout 10 ms
2025-02-20 13:51:08,200 INFO  [org.exa.CallCancelResource] (vert.x-eventloop-thread-0) request timed out
2025-02-20 13:51:08,277 INFO  [org.exa.ExampleResource] (vert.x-eventloop-thread-1) /long/a: starting
2025-02-20 13:51:08,785 INFO  [org.exa.ExampleResource] (vert.x-eventloop-thread-1) /long/a: responding
2025-02-20 13:51:31,611 INFO  [org.exa.CallCancelResource] (vert.x-eventloop-thread-0) calling /long/a with timeout 10 ms
2025-02-20 13:51:31,614 INFO  [org.exa.ExampleResource] (vert.x-eventloop-thread-1) /long/a: starting
2025-02-20 13:51:31,640 INFO  [org.exa.CallCancelResource] (vert.x-eventloop-thread-0) request timed out
2025-02-20 13:51:31,640 INFO  [org.exa.ExampleResource] (vert.x-eventloop-thread-1) /long/a: canceling
2025-02-20 13:51:41,085 INFO  [org.exa.CallCancelResource] (vert.x-eventloop-thread-1) calling /long/a with timeout 10 ms                                                                                                      
2025-02-20 13:51:41,090 INFO  [org.exa.ExampleResource] (vert.x-eventloop-thread-0) /long/a: starting                                                                                                                               
2025-02-20 13:51:41,111 INFO  [org.exa.CallCancelResource] (vert.x-eventloop-thread-1) request timed out
2025-02-20 13:51:41,111 INFO  [org.exa.ExampleResource] (vert.x-eventloop-thread-0) /long/a: canceling

@geoand
Copy link
Contributor Author

geoand commented Feb 20, 2025

Thanks for checking.

By first you mean what exactly?

@calebkiage
Copy link

calebkiage commented Feb 20, 2025

The first request after the server starts doesn't cancel the request. I've attached logs. Instead of throwing an exception, resetting doesn't happen.

@geoand
Copy link
Contributor Author

geoand commented Feb 20, 2025

Thanks. I'll have a look later.

@geoand
Copy link
Contributor Author

geoand commented Feb 20, 2025

Can you provide some pointers on how to reproduce the issue using the sample you added above?

@calebkiage
Copy link

Hi, sure. You should run the sample:

./gradlew quarkusDev

then in another terminal, run

curl http://localhost:9000/call/cancel2

The following line should NOT be in the logs, but it is:

... INFO  [org.exa.ExampleResource] (vert.x-eventloop-thread-1) /long/a: responding

The expectation is that the ExampleResource should log:

... INFO  [org.exa.ExampleResource] (vert.x-eventloop-thread-1) /long/a: canceling

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.

Support connection reset on cancellation for generated REST clients
3 participants