Conversation
There was a problem hiding this comment.
Why not return Uninterruptibles.getUninterruptibly(this) ?
|
I refactored session init so that setting the keyspace is non-blocking (e1e1694). This will require a few adjustments when merging with JAVA-544, because 544 makes connection failures non-fatal when initializing a pool. However there is one exception to this, which is an InvalidQueryException when setting the keyspace at session creation (what is captured by |
|
Force pushed to rebase on current 2.0 (which includes fix for 544). I've also cherry-picked the fix for 725 on this branch. |
There was a problem hiding this comment.
Should also add that if you change the keyspace using USE <keyspace> after connecting the Session that borrowConnection will block until the keyspace is set (presumably until JAVA-893 is implemented). This can cause a lockup in netty threads if you call executeAsync in a callback using sameThreadExecutor.
Work in progress, I will add automated tests in separate commits.
SessionManager#prepareAsyncis covered in JAVA-725 (#396).