Skip to content

It seems that the async client is blocking when consuming a cursor #433

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

Closed
oridag opened this issue May 4, 2022 · 5 comments
Closed

It seems that the async client is blocking when consuming a cursor #433

oridag opened this issue May 4, 2022 · 5 comments

Comments

@oridag
Copy link

oridag commented May 4, 2022

Is that by design?

@rashtao
Copy link
Collaborator

rashtao commented May 5, 2022

You are right, this is unfortunately due to some legacy design decision.
To work around it, you can manually create the requests to consume the cursor and execute them by calling http://arangodb.github.io/arangodb-java-driver/javadoc-6_16/com/arangodb/async/ArangoDBAsync.html#execute-com.arangodb.velocystream.Request-

We are currently evaluating the implementation of a new driver which would be based on asynchronous/reactive core and overcome this limitation.

@oridag
Copy link
Author

oridag commented May 10, 2022

👍

@oridag
Copy link
Author

oridag commented May 29, 2022

So circling back to this, I don't see how that workaround can work out because ArangoCursorAsync doesn't provide access to the first pre-fetched page of results. Am I missing something?

@rashtao
Copy link
Collaborator

rashtao commented Jun 3, 2022

Here is an example showing how to consume a cursor in a non-blocking way using com.arangodb.async.ArangoDBAsync#execute: https://gist.github.com/rashtao/513172e4a001f6f1708ed0cbb3a895bf

@rashtao
Copy link
Collaborator

rashtao commented Dec 18, 2023

@rashtao rashtao closed this as completed Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants