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

Opening new connections in org.redisson.CommandExecutorService#async #223

Closed
AmigoV opened this issue Aug 19, 2015 · 5 comments
Closed

Opening new connections in org.redisson.CommandExecutorService#async #223

AmigoV opened this issue Aug 19, 2015 · 5 comments
Milestone

Comments

@AmigoV
Copy link

AmigoV commented Aug 19, 2015

Rmap.addAndGetAsync (and any *Async methonds) - as i understand it shouldn't lock the calling thread, and return value (Future) as soon as possible.
But if for any reason connection is not established yet the calling thread will be blocked.
And if redis server is not available at all it will be blocked for very long period of time.

Maybe i'm wrong but it doesn't look like async nor lock-free.

@mrniko
Copy link
Member

mrniko commented Aug 19, 2015

You are right. Connection should be established in async too. But as i wrote the underlying Redis client used by Redisson is fully async and lock-free not the Redisson whole

@mrniko
Copy link
Member

mrniko commented Aug 19, 2015

But if you check RBatch it's fully implemented with async-nature

@AmigoV
Copy link
Author

AmigoV commented Aug 19, 2015

thx, it seems RBatch suits me very well

@AmigoV
Copy link
Author

AmigoV commented Aug 19, 2015

No, it doesn't :)

Yes, RBatch allows me to queue updates without blocking.
But as soon as i try to execute them (RBatch#executeAsync) the same situation will happens again: the calling thread will be blocked till connection is established or till it fails to connect.

@mrniko mrniko added this to the 2.2.0 milestone Aug 19, 2015
mrniko pushed a commit that referenced this issue Oct 10, 2015
@mrniko
Copy link
Member

mrniko commented Oct 10, 2015

done

@mrniko mrniko closed this as completed Oct 10, 2015
mrniko pushed a commit that referenced this issue Oct 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants