Skip to content

Improve asynchronous API (JAVA-821, JAVA-822)#427

Merged
olim7t merged 2 commits into
2.0from
java822
Aug 28, 2015
Merged

Improve asynchronous API (JAVA-821, JAVA-822)#427
olim7t merged 2 commits into
2.0from
java822

Conversation

@olim7t

@olim7t olim7t commented Aug 6, 2015

Copy link
Copy Markdown
Contributor

Work in progress, I will add automated tests in separate commits.

SessionManager#prepareAsync is covered in JAVA-725 (#396).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not return Uninterruptibles.getUninterruptibly(this) ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@olim7t

olim7t commented Aug 9, 2015

Copy link
Copy Markdown
Contributor Author

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 SetKeyspaceException in this commit).

@olim7t

olim7t commented Aug 20, 2015

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

be -> been (same @ 327)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Comment thread features/async/README.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

olim7t added a commit that referenced this pull request Aug 28, 2015
@olim7t olim7t merged commit 37feec1 into 2.0 Aug 28, 2015
@olim7t olim7t deleted the java822 branch August 28, 2015 09:37
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.

3 participants