[
https://issues.apache.org/jira/browse/CASSANDRA-19000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17785044#comment-17785044
]
Ekaterina Dimitrova commented on CASSANDRA-19000:
-------------------------------------------------
I confirmed with Bret McGuire that, in this case, it is expected behavior in
driver version 3.11.5 (the current Java driver version is 5.0+).
Looking into 3.11.0, the same explanation [1] applies there too. The release
notes show minor changes unrelated to what we are looking at here -
[https://github.com/apache/cassandra-java-driver/tree/3.11.5/changelog.]
(looking at the commit log, there are no other changes not mentioned in the
official change log)
[1] From Bret about 3.11.5:
{quote}ConnectionCloseFuture.force() is the relevant logic and the [use of the
listener off of the channel.close()
future|https://github.com/apache/cassandra-java-driver/blob/3.11.5/driver-core/src/main/java/com/datastax/driver/core/Connection.java#L1460C1-L1471]
suggests that anybody who waits on the future via get() would be guaranteed
that cleanup had completed. But Connection.closeAsync() only returns the future
(which seems right) and the various methods on HostConnectionPool either [call
closeAsync() without returning
anything|https://github.com/apache/cassandra-java-driver/blob/3.11.5/driver-core/src/main/java/com/datastax/driver/core/HostConnectionPool.java#L644-L646]
or [just call force()
directly|https://github.com/apache/cassandra-java-driver/blob/3.11.5/driver-core/src/main/java/com/datastax/driver/core/HostConnectionPool.java#L225-L231].
HostConnectionPool.closeAsync() does return the future, so there's at least the
possibility somebody could call this and wait. Without a stack trace of the
actual shutdown it's hard to say for sure, but based on everything I'm seeing
here I would definitely say this behaviour is expected within the current
driver.
I wouldn't characterize this as a bug. The intent here is clearly for best
efforts work at eventual completion.
[CloseFuture.force()|https://github.com/apache/cassandra-java-driver/blob/3.11.5/driver-core/src/main/java/com/datastax/driver/core/CloseFuture.java#L55-L57]
even explicitly states as much.
{quote}
If no one has concerns here, I can commit it next week (Andres is already OOO,
so I do not expect an answer from him before Monday next week)
> Test Failure:
> org.apache.cassandra.tools.BulkLoaderTest.testBulkLoader_WithArgs2
> --------------------------------------------------------------------------------
>
> Key: CASSANDRA-19000
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19000
> Project: Cassandra
> Issue Type: Bug
> Components: CI
> Reporter: Ekaterina Dimitrova
> Assignee: Ekaterina Dimitrova
> Priority: Normal
> Fix For: 4.0.x, 4.1.x, 5.0-rc, 5.x
>
>
> h3.
> https://ci-cassandra.apache.org/job/Cassandra-trunk/1766/testReport/org.apache.cassandra.tools/BulkLoaderTest/testBulkLoader_WithArgs2_cdc_jdk17_arch_x86_64_python2_7/
> {code:java}
> Error Message
> Wrong thread status, active threads unaccounted for: [cluster3-nio-worker-0]
> Stacktrace
> junit.framework.AssertionFailedError: Wrong thread status, active threads
> unaccounted for: [cluster3-nio-worker-0] at
> org.apache.cassandra.tools.OfflineToolUtils.assertNoUnexpectedThreadsStarted(OfflineToolUtils.java:120)
> at
> org.apache.cassandra.tools.BulkLoaderTest.testBulkLoader_WithArgs2(BulkLoaderTest.java:129)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method) at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> {code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]