absurdfarce commented on PR #2003:
URL: 
https://github.com/apache/cassandra-java-driver/pull/2003#issuecomment-2588090185

   Ideally we wouldn't need to go to all this length to handle such a case.  
Ideally we'd just slap a whenComplete() op onto the end of the 
[CompletableFuture that loads the 
value](https://github.com/apache/cassandra-java-driver/blob/4.x/core/src/main/java/com/datastax/oss/driver/internal/core/cql/CqlPrepareAsyncProcessor.java#L149-L159)
 and have it do the right thing in the cancellation case.  I think that was my 
second try, and in that case I could not get such a whenComplete() to fire in 
obvious cancellation cases.  Not sure if there's some kind of JVM issue there 
or if something else in our code base was somehow blocking the corresponding 
CancellationException from progressing... but testing made it very clear that 
when cancel() was called the stage added via whenComplete() wasn't being called 
correctly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to