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

3.x: there is some case when driver does not release DefaultResultSetFuture properly #365

Open
dkropachev opened this issue Nov 10, 2024 · 0 comments

Comments

@dkropachev
Copy link
Collaborator

dkropachev commented Nov 10, 2024

It comes from scylladb/cassandra-stress#30.
Time to time it can stuck waiting for DefaultResultSetFuture to be released:

"Thread-2" prio=5 Id=59 WAITING on com.datastax.driver.core.DefaultResultSetFuture@2ad5ebfd
  at [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
  -  waiting on com.datastax.driver.core.DefaultResultSetFuture@2ad5ebfd
  at [email protected]/java.util.concurrent.locks.LockSupport.park(Unknown Source)
  at app//com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:561)
  at app//com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:247)
  at app//com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:308)
  at app//com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:58)
  at app//org.apache.cassandra.stress.util.JavaDriverClient.executePrepared(JavaDriverClient.java:247)
  at app//org.apache.cassandra.stress.operations.predefined.CqlOperation$JavaDriverWrapper.execute(CqlOperation.java:308)

It means that there is a bug in ReleaseHandler or in DefaultResultSetFuture that leaves DefaultResultSetFuture without set or setException called on it.
As result getUninterruptibly waits for it forever.
to go forward we need to do the following:

  1. Check ReleaseHandler and DefaultResultSetFuture to make sure every case ends up in set or setException
  2. Find a way for AbstractSession.execute(Statement statement) to have timeout on getUninterruptibly.
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

No branches or pull requests

1 participant